question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[no-invalid-aria-attributes] Doesn't work at all?

See original GitHub issue

I don’t understand - even using a simple <button type="button" aria-haspopup="true"> leads to The value for aria-haspopup must be a single token from the following: false, true, menu, listbox, tree, grid, dialog.. Am I doing something wrong?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
bmishcommented, Feb 15, 2022

I’d like to publish a fix for this in the next few days if someone can fix it.

0reactions
judithhinlungcommented, Feb 15, 2022

The failures for <button aria-haspopup="true"></button> is caused by a bug in the code, which interprets them as boolean values, instead of valid string values. Casting true/false values to strings before checking that they are part of the list of accepted values will fix this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

aria-invalid - Accessibility - MDN Web Docs
The aria-invalid attribute is used to indicate that the value entered into an input field is not in a format or a value...
Read more >
aria-* attributes do not have valid values - Stack Overflow
1 Answer 1 · tab is a valid role and the <button> element is allowed to have that role. (See the <button> spec...
Read more >
ARIA attributes must conform to valid values | Axe Rules
Many ARIA attributes accept a specific set of values. Allowed values, acceptable "undefined" values, and acceptable "default" values are required. Failure to ...
Read more >
ARIA21: Using Aria-Invalid to Indicate An Error Field | WAI - W3C
The aria-invalid attribute is used on required fields that have no input. A message above the form conveys that form submission has failed...
Read more >
What you need to know about ARIA and how to fix common ...
The first rule is don't use ARIA, which just means if you can use a native HTML element or attribute to get the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found