Update combobox.jsx based on WCAG Success Criteria: 4.1.2#3146
Update combobox.jsx based on WCAG Success Criteria: 4.1.2#3146anunay999 wants to merge 4 commits intosalesforce:masterfrom
combobox.jsx based on WCAG Success Criteria: 4.1.2#3146Conversation
|
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. |
| 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.
please remove this extra comment
|
@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:fixhas been run and linting passes.components/component-docs.jsonCI tests pass (npm test).REVIEWER checklist (do not remove)
components/component-docs.jsontests.Required only if there are markup / UX changes
last-slds-markup-reviewinpackage.jsonand push.last-accessibility-review, topackage.jsonand push.npm run local-updatewithin locally cloned site repo to confirm the site will function correctly at the next release.