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

Bug: aria-description is a valid ARIA property #21035

Closed
nordfjord opened this issue Mar 19, 2021 · 7 comments
Closed

Bug: aria-description is a valid ARIA property #21035

nordfjord opened this issue Mar 19, 2021 · 7 comments
Labels
Component: DOM Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug

Comments

@nordfjord
Copy link

React version: 16.x

Steps To Reproduce

  1. render(<div aria-description="Description" />)

Link to code example:
flems link

The current behavior

warning: Invalid aria prop `aria-description` on <div> tag

The expected behavior

Nothing. It's part of WAI-ARIA 1.3

https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Annotations

@nordfjord nordfjord added the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label Mar 19, 2021
@eps1lon
Copy link
Collaborator

eps1lon commented Mar 20, 2021

I guess the question is what React considers a "valid" aria prop:

  1. a specific version (range) of Aria
  2. a version with a particular state (WR,CR,PR,REC)
  3. what spec editors consider the "stable" version
  4. any aria prop that ever existed

@itudoradrian
Copy link

Yeah, it seems they've added support for this fairly recently.

w3c/aria#891

@nordfjord
Copy link
Author

We might also ask: “Why is react telling me what is and isn’t a valid aria attribute.”

React isn’t the source of truth for that information.

It sounds like the job of a linter rather than something react should warn about.

@itudoradrian
Copy link

I think it might be from a compiler.

@gaearon
Copy link
Collaborator

gaearon commented Sep 6, 2021

We might also ask: “Why is react telling me what is and isn’t a valid aria attribute.”

The reason is that they're often misspelled so on the whole it's beneficial to warn for unknown ones. I'll merge the PR.

@gaearon
Copy link
Collaborator

gaearon commented Sep 6, 2021

Fixed by #22142. Will appear in 18.

@gaearon gaearon closed this as completed Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: DOM Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug
Projects
None yet
Development

No branches or pull requests

5 participants