- Issue created by @joachim
- First commit to issue fork.
- Merge request !12401Issue #3530304: Views exposed forms should use SEARCH html element or aria role = search β (Open) created by Unnamed author
- πΊπ¦Ukraine vitaliyb98
Added the search [ARIA] role to the search form provided by the core Search module to improve accessibility and semantic markup:
core/modules/search/src/Form/SearchBlockForm.php
and
core/modules/search/src/Form/SearchPageForm.php - πΊπΈUnited States smustgrave
For good practice issue summary should be complete. May need accessibility sign off
- π¬π§United Kingdom joachim
> Added the search [ARIA] role to the search form provided by the core Search module to improve accessibility and semantic markup:
That looks useful too, but the issue was about Views.
Also, an a11y problem is a bug.
- πΊπ¦Ukraine vitaliyb98
Hi @joachim, could you please provide more details?
Do you mean adding this attribute to every Exposed Form, even if it doesn't contain a text input for example, if it only has checkboxes? - π¨π¦Canada mgifford Ottawa, Ontario
I made some small changes to the issue summary.
The latest MR adds the ARIA search role to the existing form.
It would be better though to switch core/modules/search/src/Form/SearchBlockForm.php & core/modules/search/src/Form/SearchPageForm.php to just use
<search>
though. HTML (including search) is always better, if possible, than using ARIA. - Status changed to Needs work
about 1 month ago 12:40pm 18 August 2025 - πΊπ¦Ukraine vitaliyb98
I tried to wrap the search form with the HTML element using a template override.
But adding extra markup around the form broke the styles and JavaScript for the search block (tested in the Olivero theme).For now, it seems we can only safely add this wrapper directly in the Olivero theme, together with fixes for the broken search functionality. If we add the wrapper globally (for example, in the Search module), it could break other themes as well.