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

Some fields' select/input elements missing id attribute #7319

Closed
missmatsuko opened this issue Dec 22, 2020 · 3 comments
Closed

Some fields' select/input elements missing id attribute #7319

missmatsuko opened this issue Dec 22, 2020 · 3 comments
Labels
accessibility 👤 features related to accessibility bug

Comments

@missmatsuko
Copy link
Contributor

missmatsuko commented Dec 22, 2020

Description

Some fields' select/input elements missing id attribute, so their labels aren't linked up:

  • select in dropdown field
  • select in multi-select field
  • input in number field

Steps to reproduce

  1. Inspect the select/input in dropdown, multi-select, and number fields.

Additional info

  • Craft version: 3.5.17.1
@missmatsuko missmatsuko added bug accessibility 👤 features related to accessibility labels Dec 22, 2020
@missmatsuko missmatsuko changed the title Dropdown and multi-select select elements missing id attribute Some fields' select/input elements missing id attribute Dec 22, 2020
@brandonkelly
Copy link
Member

This should be fixed in general as of Craft 3.5.13 thanks to d42c9b5. Where are you seeing missing id attributes?

@missmatsuko
Copy link
Contributor Author

For example, on this dropdown field. The label has a for attribute of dropdown1, but there is no element on the page with an id of dropdown1. In this case, the <select> element should have this id attribute.

Screenshot of dropdown field with inspector panel open.

@brandonkelly
Copy link
Member

Ahh, thanks! Just fixed that for the next release, for Dropdown, Multi-select, and Number fields.

I’ve also “fixed” it for Checkboxes and Radio Buttons fields for Craft 3.6, by having those field types start using <fieldset> + <legend>s rather than <div> + <label>s (341911b). (That change relied on the changes in fea2e21 to work, which is 3.6-only, so that’s why it wasn’t done for 3.5.x.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility 👤 features related to accessibility bug
Projects
None yet
Development

No branches or pull requests

2 participants