Skip to content
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

chore(apps): updates to disabled sb a11y tests #3344

Draft
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

oddvernes
Copy link
Collaborator

@oddvernes oddvernes commented Mar 11, 2025

resolves #3245

I do not get any violations if I re-enable aria-allowed-attr rule, so I have removed this.

The "combobox role not allowed on input" problem in Suggestion/Multisuggestion seems to possibly stem from this reported issue in axe-core.

The logic axe-core uses vs the logic the spec uses for determining when text/tel/url/email/search should be treated as comboboxes is also slightly different; the spec says that the presence of a list attribute is enough that it should be treated as combobox-like, but axe-core demands that it not just have a list attribute but that the list attribute be a valid idrefs-style reference to a datalist element (html-elms.js is inconsistent with implicit-html-roles.js and just looks for any list attribute)

Specifically this check in implicit-html-roles.js
suggestionsSourceElement = listElement && listElement.nodeName.toLowerCase() === 'datalist';
In our code this returns u-datalist.

Then in get-element-unallowed-roles.js there is now a mismatch between explicit and implicit role returning false for roleIsAllowed

If I change the element to datalist in SuggestionList.tsx I no longer get the violation in storybook.

Conclusion: it should fix itself in a future update of @storybook/addon-a11y after the axe-core issue linked above has been resolved and published

Copy link

changeset-bot bot commented Mar 11, 2025

⚠️ No Changeset found

Latest commit: 88ee0a4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Mar 11, 2025

Preview deployments for this pull request:

Storybook - 11. Mar 2025 - 16:01

Copy link
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 48.55% 3250 / 6694
🔵 Statements 48.55% 3250 / 6694
🔵 Functions 82.69% 215 / 260
🔵 Branches 77.6% 558 / 719
File CoverageNo changed files found.
Generated in workflow #2442 for commit 88ee0a4 by the Vitest Coverage Report Action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate disabled a11y rules in Storybook test
1 participant