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

Suggestion: Warn when <button> or <a> lack inner text, and recommend to add aria-label #12041

Open
elron opened this issue Jun 16, 2024 · 0 comments
Labels

Comments

@elron
Copy link

elron commented Jun 16, 2024

Describe the problem

Google's PageSpeed Insights sometimes give out warning regarding Accessibility, and recommends buttons to have aria-label if the inner text of a button has missing text.

Screenshot:

image

The thing is, sometimes I forget to add them to my <button> or <a>, usually when they have just an Icon inside and no text, for example.

image

Describe the proposed solution

I would like to see a warning inside VS Code, similar to how I see this warning:

image
  • I suggest adding a warning message such as "<button> is missing inner text, please provide aria-label that describes the button's behavior for better accessibility".

  • Same warning for <a> elements (that lack inner text).

Importance

would make my life easier

@elron elron changed the title Suggestion: Warn when <button> has missing content and recommend to add aria-label Suggestion: Warn when <button> or <a> lack inner content, and recommend to add aria-label Jun 16, 2024
@elron elron changed the title Suggestion: Warn when <button> or <a> lack inner content, and recommend to add aria-label Suggestion: Warn when <button> or <a> lack inner text, and recommend to add aria-label Jun 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants