ziolko / aria-devtools

Easily spot missing ARIA labels, misused ARIA roles, and incomplete keyboard support in your web applications.

Home Page:https://chrome.google.com/webstore/detail/aria-devtools/dneemiigcbbgbdjlcdjjnianlikimpck?hl=en

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Duplicated labels when `input`/`label` pairings are siblings

brendanarnold-bjss opened this issue · comments

Hi,

Great project, very useful :)

I wanted to check this behaviour is intentional ...

If I have the following bit of HTML

<label>
  <input type="radio" />
  Some text
</label>

Then we get the following result in the preview ...

image

However if I have the following HTML (which is also a valid) ...

<input id="my-radio" type="radio" />
<label for="my-radio'>Some text</label>

Then the output looks like ...

image

You can see the label text is duplicated

This is being raised as a bug in my project and I wanted to know if it really is what a screenreader would render?

Cheers,
Brendan

Hi,

It seems that e.g. NVDA does not read the the text twice for labels with HTML for attribute.

I've fixed this and published a new version to Google Web Store. It may take a few days before this version gets verified by Google and updated on your device.

Cheers,
Mateusz

I am happy to help. Keep in mind that ARIA DevTools can help you with the development of accessible websites but you should still test your products with an actual screen reader at some point.

For now, I am closing this issue. Feel free to reopen it or raise another one in case of any further problems.

Also, if you are happy with the tool, please remember to star this Github repository and leave a positive review on Chrome Web Store :)