You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New versions of axe-core (4.2 and later) will treat it as a violation if you have aria-label attribute on generic elements like span. See the Axe changelog and this PR. Polaris does this on the Icon component and maybe others as well.
This is significant because recent versions of @storybook/addon-a11y use axe-core 4.2.0. See @kaelig PR here.
Projects using Polaris and addon-a11y in their CI pipeline will either have to disable this rule or cannot upgrade Storybook.
Expected behavior
The a11y rule linked in the axe-core PR seems valid. Screen readers apparently won't read aria-label for generic elements, so they should be removed.
Actual behavior
Polaris includes aria-label for many generic elements.
Steps to reproduce the problem
Install @storybook/addon-a11y version 6.3.7 and Polaris on the same project
Run storybook
Open accessibility tab for a story that includes one of the affected components (e.g. Icon with accessibilityLabel prop)
A violation will appear relating to the aria-label attribute
Specifications
Are you using the React components? (Y/N): Y
Polaris version number: 6.5.0
Browser: NA
Device: NA
Operating System: NA
The text was updated successfully, but these errors were encountered:
stufreen
added
the
Bug
Something is broken and not working as intended in the system.
label
Aug 27, 2021
Issue summary
New versions of
axe-core
(4.2 and later) will treat it as a violation if you havearia-label
attribute on generic elements likespan
. See the Axe changelog and this PR. Polaris does this on theIcon
component and maybe others as well.This is significant because recent versions of
@storybook/addon-a11y
use axe-core 4.2.0. See @kaelig PR here.Projects using Polaris and
addon-a11y
in their CI pipeline will either have to disable this rule or cannot upgrade Storybook.Expected behavior
The a11y rule linked in the axe-core PR seems valid. Screen readers apparently won't read
aria-label
for generic elements, so they should be removed.Actual behavior
Polaris includes
aria-label
for many generic elements.Steps to reproduce the problem
accessibilityLabel
prop)aria-label
attributeSpecifications
The text was updated successfully, but these errors were encountered: