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

fix(aria-valid-attr-value): report incomplete when idrefs are not required #4204

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

Conversation

WilcoFiers
Copy link
Contributor

Closes: #4202

Comment on lines +96 to +105
const attrType = standards.ariaAttrs[attrName]?.type;
// Only required IDREFs can fail this check
if (
['idref', 'idrefs'].includes(attrType) &&
!requiredAttrs.includes(attrName)
) {
needsReview = `aria-labelledby="${attrValue}"`;
// TODO: es-modules_tree
messageKey =
axe._tree && axe._tree[0]._hasShadowRoot ? 'noIdShadow' : 'noId';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure yet. Perhaps IDREF checking should go into a separate check?

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.

aria-valid-attr-value rule too strict on aria-controls / aria-owns
1 participant