-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[Tabs] scrollButtons have an empty button error in compliance tools #15646
[Tabs] scrollButtons have an empty button error in compliance tools #15646
Conversation
[Tabs] scrollButtons have an empty button error in compliance tools #15371
Details of bundle changes.Comparing: 048c9ce...de2ce8d
|
Yarn Prettier
@elnikolinho A previous effort was done #15507. We couldn't reach a good solution. This time, I have looked at how Ant Design, Vuetify and Element solve the problem, I have reproduced the same strategy. |
@@ -21,7 +21,7 @@ AccessibleTabScrollButton.propTypes = { | |||
direction: PropTypes.string.isRequired, | |||
}; | |||
|
|||
const findScrollButton = (wrapper, direction) => wrapper.find(`button[aria-label="${direction}"]`); | |||
const findScrollButton = (wrapper, direction) => wrapper.find(`span[aria-label="${direction}"]`); |
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.
That looks like it's making a11y worse. I stand by #15507 (review). We shouldn't set aria-labels for app authors. If anything we should look at how labels can be provided.
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.
I have change the pull request, it doesn't set aria-labels for app authors. It makes the element disappear from the accessibility tools, they don't need it. How is it worse?
It's different in the test, the tests override the component to add an aria-label.
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.
a11y is not just for screen readers. non-impaired users make use of these features as well. This looks like it's just hiding an a11y issue instead of solving it.
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.
Do you have resources to support that the scroll buttons shouldn't be "hidden"? The only one I could find is how Antd, Vuetify and Element solve the problem.
I think that we should focus our energy on #6955.
I believe you missed the update I have done to the original code. Could you look a second time? :)
Hold on, I want to try something even cleaner. |
Thanks! |
Closes #15371
Adds aria-label to TabScrollButtons, fixing an issue where accessibility tools pickup the buttons for not having discernible text