-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
feat(Dropdown): add hideTitleText prop #7594
feat(Dropdown): add hideTitleText prop #7594
Conversation
Deploy preview for carbon-elements ready! Built with commit b7c027d |
Deploy preview for carbon-components-react ready! Built without sensitive environment variables with commit b7c027d https://deploy-preview-7594--carbon-components-react.netlify.app |
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.
would you mind renaming the prop to hideLabel
to match the other Carbon components? also it looks like you will need to update snapshots in order to pass CI
edit: yeah it looks like only the listbox components use "title" instead of "label" but this may need to be updated in the future to match the existing components like TextInput, Select, etc.
…hideLabel-dropdown
…hideLabel-dropdown merge with master please
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.
Not seeing any a11y errors with the hideLabel
prop enabled. Thanks for contributing! LGTM 👍 ✅
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.
looks good to me
Closes #
Addresses this issue #7571
Changelog
New
hideTitleText
prop for the Dropdown. ThetitleText
will still exist programatically but hiding it visually lends itself to smoother design (especially with inline Dropdowns). This sort of prop also exists in the Select component.Testing / Reviewing
hideTitleText
prophideTitleText
being true. There should not be an error for "The WAI-ARIA property must reference a non-empty unique id of an existing element that is visible" which normally occurs when thetitleText
is missing entirely. However, because we have hidden it visually but not programatically, the error shouldn't appear.