-
Notifications
You must be signed in to change notification settings - Fork 420
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
Update combobox.jsx
based on WCAG Success Criteria: 4.1.2
#3146
base: master
Are you sure you want to change the base?
Conversation
Thanks for opening this pull request! 💯 This is a community-driven project, and we can't do it without your participation. Please check out our contributing guidelines and review the Contributor Checklist if you haven't already, to make sure everything is squared away. CircleCI will take about 10 minutes to run through the same items that are on the Contributor checklist with a pass/fail check below. Please fix any issues that cause CircleCI to fail or ask for clarification--we try, but sometimes the errors can be unclear. |
Thanks for the contribution! Before we can merge this, we need @anunay999 to sign the Salesforce Inc. Contributor License Agreement. |
components/combobox/combobox.jsx
Outdated
@@ -1774,7 +1774,8 @@ class Combobox extends React.Component { | |||
} | |||
}} | |||
placeholder={labels.placeholderReadOnly} | |||
readOnly | |||
// based on WCAG Success Criteria: 4.1.2: Name, Role, Value - input element is interactive | |||
// readOnly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove this extra comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@anunay999 I tested out your change in storybook. I think removing readOnly from input might not be the right fix for this issue and here is why:
I think combobox might require a factoring to follow the most up to date accessibility standard. |
@anunay999 You may want to check out this blueprint. https://www.lightningdesignsystem.com/components/combobox/#Base-Combobox I'm pretty sure the blueprints used to use When reviewing the Base Combobox blueprint, keep in mind it may be using a different ARIA specs: 1.0 vs 1.1 vs 1.2. The latest version of SLDS is using a span: |
Thank you for pointing out the differences in ARIA specifications and HTML structures between the SLDS and LWC versions of the combobox. Upon reviewing the LWC combobox example, it is evident that it uses a element with the class slds-truncate to display the selected value. In contrast, the React implementation includes a readonly attribute on the element. Please find the attached screenshots from the above mentioned source for reference HTML structure for lwc
|
Fixes #3144
Additional description
CONTRIBUTOR checklist (do not remove)
Please complete for every pull request
npm run lint:fix
has been run and linting passes.components/component-docs.json
CI tests pass (npm test
).REVIEWER checklist (do not remove)
components/component-docs.json
tests.Required only if there are markup / UX changes
last-slds-markup-review
inpackage.json
and push.last-accessibility-review
, topackage.json
and push.npm run local-update
within locally cloned site repo to confirm the site will function correctly at the next release.