-
Notifications
You must be signed in to change notification settings - Fork 7
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
Adjust aria roles and labels for collection search #95
base: main
Are you sure you want to change the base?
Conversation
…mpared to text type, but User Agents can potentially have different styling
…e label on the search input
# Conflicts: # src/collective/collectionfilter/portlets/collectionsearch.pt # src/collective/collectionfilter/tests/robot/keywords.robot # src/collective/collectionfilter/tests/robot/test_filterportlets.robot # src/collective/collectionfilter/tiles/search.pt
@djay If we add an I propose having the input labelled by the portlet title rather than hard-coding |
# Conflicts: # src/collective/collectionfilter/tests/robot/test_filterportlets.robot
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.
I think its better if there is a way to backdown to something still compliant should the user choose to not have a title.
@petschki @djay As part of this PR, I'd like to make it easier for CMS users to meet WCAG without having to think about this. Part of that would mean ensuring that the search input always has a label. While I could add fallback How would you feel about making the portlet title mandatory (to ensure we get a meaningful input description), but having a checkbox to visually hide the title to preserve styling options collectionfilter users may have already made? An upgrade step should be able to automatically enable this checkbox for anybody who has left the portlet title empty in the past/ |
This PR adds an
aria-label
to the search input, changes the input type tosearch
and changes the search form to a role ofsearch
rather thanform
.search
role is a best practise for search forms.This is certainly an improvement for users of assistive technology as it will announce it is a search rather than just a generic input (and screen-reader users will have it announced as a page landmark), however, some user testing should ideally be done in the future to find out if the markup is too explicit.
Todo
Add the fallback if no title is provided