-
Notifications
You must be signed in to change notification settings - Fork 598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(Timeline): render as unordered list #5176
fix(Timeline): render as unordered list #5176
Conversation
🦋 Changeset detectedLatest commit: 05c6b08 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks! |
size-limit report 📦
|
…4-prctimeline-list-structure-is-missing
css fix
This reverts commit 57434d7.
…4-prctimeline-list-structure-is-missing
…4-prctimeline-list-structure-is-missing
…g' of github.com:primer/react into francinelucca/3354-prctimeline-list-structure-is-missing
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
function TimelineItem<As extends React.ElementType>(props: TimelineItemsProps<As>, ref: ForwardedRef<any>) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Taking a page out of Branchname here, open to suggestions
👋 Hi from github/github! Your integration PR is ready: https://github.com/github/github/pull/350532 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay! Just wanted to ask, would it be possible for the behavior of Timeline.Group
to live inside of Timeline
? Basically have the flag turn Timeline into a ul and Timeline.Item into an li
If I remember right, when we last talked about this that would have a problem when we needed to make separate lists, is that right? If that's the case, could we recommend folks do multiple timelines?
My only hesitation with Timeline.Group
is that it seems like it would always be necessary which made me think if we could have it baked into Timeline
or not. Let me know what you think!
Yeah I think we can do that, the thing is we need
I originally added the |
Decided to close issue, closing PR |
Closes https://github.com/github/primer/issues/3354
Currently the
Timeline
component lacks semantic structure, in that it renders like adiv
withdiv
s inside of it. This doesn't convey appropriate structural meaning accessibility-wise. This PR introduces a new API under a FF to have theTimeline
render as an unordered list with listitems inside of itIntroduces a new rendering behavior for
Timeline
under feature flag:Timeline.Item
renders as anli
Timeline.Item
will be wrapped inside aTimeline.Group
(new component) that renders as anul
Changelog
New
primer_react_timeline_as_list
feature flag (defaults to false)Timeline.Group
subcomponent (used to wrapTimeline.Item
s within a list when FF is onTimeline.Group
subcomponent toTimeline
*.docs.jsonTimeline
behaviorsChanged
primer_react_timeline_as_list
FF in SBTimeline
stories, use new APITimeline
to avoid visual changes when switching toul
TimelineItem
asli
ifprimer_react_timeline_as_list
FF is on (div
otherwise)aria-hidden
toTimeline.Break
ifprimer_react_timeline_as_list
FF is onTimeline
snapshotTimelineItem
typesRollout strategy
1- Release new API under FF (this PR)
2 - Move dotcom to new API (upcoming separate PR, after this is merged)
3 - Deprecate "old" API
4 - Remove old API in next major
Testing & Reviewing
Revise deployment stories, see DOM renders as list and no visual regressions
Merge checklist