Skip to content

Conversation

tidy-dev
Copy link
Contributor

@tidy-dev tidy-dev commented Oct 1, 2024

Closes https://github.com/github/accessibility-audits/issues/9547

Description

When a list is not being used for selection purposes, the list should use the role of list instead of listbox and the items should be listitem instead of option. This PR adds the ability to change the roles of a list. I checked all our other List use cases and they appear to be for selection so I do not believe this needs to be utilized anywhere else.

Additionally, a member of our accessibility team who regularly uses screen readers suggested that this lists have a title to be more friendly to screen readers. In the process of adding that, I noticed that we had the ability to provide an aria-label to our List component but it was on a div encapsulating the list not the element with the role of list. This means that it would not be announced as the list title, but as a "group" and only if a screen reader decided to read it as it is not semantically expected to have an aria-label on a div element. Hence, there was an a11y linter disable on that line. This pr moves the aria attributes to the Grid element that has the list role and removes the linter disable. Bonus win!

Additionally again.. when I started this work, it was glaring that there had been a regression in the alignment of the unreachable commit link in the commit header. I went ahead and addressed that as well.

Screenshots

CleanShot.2024-10-01.at.14.44.44.mp4

Release notes

Notes: [Improved] The commit lists in the "Commit Reachability" dialogs are traversable in browse mode of screen readers.
[Improved] The commit lists now have a title of "Commits" to be more friendly to users of screen readers.
[Fixed] The unreachable commit header link is properly aligned.

@tidy-dev tidy-dev merged commit cf3e918 into development Oct 3, 2024
7 checks passed
@tidy-dev tidy-dev deleted the unreachable-commits-list-accessibility branch October 3, 2024 12:06
@tidy-dev tidy-dev added the accessibility Issues related to accessibility improvements label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Issues related to accessibility improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants