-
Notifications
You must be signed in to change notification settings - Fork 16
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
Proposed changes based on ada feedback #116
Conversation
Open in CodeSandbox Web Editor | VS Code | VS Code Insiders |
@weotch the cypress test failed because the aria-label on navigating by dot was different now that I updated the language of the label. Just wanted to let you know why that failed. If you are OK with these changes, then it should be OK now. |
This allows the button to keep focus when it becomes inactive
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.
@mattaebersold I made the following changes to your initial work
- I got rid of the
visually-hidden
stuff. When I tested it using MacOS Voiceover, it never read the "Selected" bit anyway - I replaced all the
disabled
attributes witharia-disabled
. That does seem like a smart change, it was frustrating when navigating by keyboard and like the "next" button would lose focus when you got to the last page. This had the side effect of the screen reader announcing that the button was "dimmed" which I think accomplishes the goal of the "Selected" label - I added the
pagination-label
prop so someone could be more specific with what the labels are
This video shows the cumulative effect of these changes, it feels pretty accessible to me.
Aria.labels.mov
If you agree, I'll tag a new version. I think it should be major version release because the removal of the [disabled]
selector could break styling on sites.
@weotch pushed this up as a draft so you can see what I'm trying to do. I got some accessibility feedback regarding the carousel for COR...
PROBLEM:
The accessible name of the carousel buttons "Slide 1" and "Slide 2" doesn't clearly describe its function or purpose.
Note: Instances of this issue were discovered. Please refer to the screenshots for details.
SOLUTION:
When a user reaches the button, there should be enough information announced for the user to understand the purpose of the button.
Change aria-label attribute values within the tags.
For example: "Slide 1" and "Slide 2".
Note that ARIA should only be used if the button cannot be sufficiently labeled using HTML only.
PROBLEM:
The screen reader doesn't announce the current slide button with selected state but rather announcing incorrectly with disabled state.
SOLUTION:
Make sure that when the carousel button is currently active, it is programmatically exposed.
To fix this issue, do the following:
<button>
tag.<button>
elements and use the javascript to define the currently active state of buttons using the class="visuallyhidden".