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

Fix: Associate labels with input fields of File and Checkbox Widget #6592

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Abhishek-17h
Copy link
Contributor


Closes #6341

@Abhishek-17h Abhishek-17h force-pushed the fix/accessibility-for-file-checkbox-widget branch from d31090a to 6bd7de3 Compare January 15, 2025 05:04
Copy link

netlify bot commented Jan 15, 2025

Deploy Preview for plone-components canceled.

Name Link
🔨 Latest commit d31090a
🔍 Latest deploy log https://app.netlify.com/sites/plone-components/deploys/678741dd88ef1c0008c1f925

Copy link

netlify bot commented Jan 15, 2025

Deploy Preview for plone-components canceled.

Name Link
🔨 Latest commit 7c6450e
🔍 Latest deploy log https://app.netlify.com/sites/plone-components/deploys/67877b1b6247560008d4e144

@Abhishek-17h
Copy link
Contributor Author

@stevepiercy @JeffersonBledsoe @davisagli Please provide review.

Copy link
Collaborator

@stevepiercy stevepiercy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

News looks good, with a minor tweak.

This is ready for a technical review.

packages/volto/news/6341.bugfix Outdated Show resolved Hide resolved
@stevepiercy stevepiercy requested review from a team January 15, 2025 05:58
@Abhishek-17h Abhishek-17h force-pushed the fix/accessibility-for-file-checkbox-widget branch 2 times, most recently from f5c083b to 53224d3 Compare January 15, 2025 06:25
Copy link
Collaborator

@stevepiercy stevepiercy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

News approved. Still needs technical review. Thanks for your work!

@@ -208,6 +210,7 @@ exports[`FileWidget renders an empty file widget component 1`] = `
</div>
<label
class="label-file-widget-input"
for="field-my-field"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Abhishek-17h Modify the tests to have a different id from one test to the other so that we don't have my-field id duplication.
Then have a look at why the label My field points to the same for="field-my-field"
https://github.com/plone/volto/pull/6592/files#diff-9f7a0caef8d93ad615d7038488525d38b67b32b86153f7441bc973f60b06f713R188

@Abhishek-17h Abhishek-17h force-pushed the fix/accessibility-for-file-checkbox-widget branch from 53224d3 to 440ef58 Compare January 15, 2025 09:08
@Abhishek-17h Abhishek-17h force-pushed the fix/accessibility-for-file-checkbox-widget branch from 440ef58 to 7c6450e Compare January 15, 2025 09:08
@Abhishek-17h
Copy link
Contributor Author

@ichim-david I’ve modified the tests to ensure each ID is unique, avoiding any duplication issues. Also I’ve verified that the label now correctly points to the associated for attribute (for="field-unique-id") in each test scenario.
Please have a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FileWidget and CheckboxWidget don't have accessible field labels
3 participants