Commit ddb1363
committed
General: Use the semantic
Wrap the form output of `get_search_form()` (html5 format) and the
`core/search` block in the HTML `<search>` landmark element, and drop
the now-redundant `role="search"` attribute on the inner `<form>`.
The `<search>` element is in Baseline and has an implicit ARIA
landmark role of `search`, providing the same semantics as the
existing `role="search"` attribute via native markup. The XHTML
fallback in `get_search_form()` is left unchanged because XHTML 1.x
does not include the `<search>` element.
For `get_search_form()`, the optional `aria_label` argument is now
applied to the `<search>` landmark element instead of the `<form>`,
since the landmark is what assistive technology exposes.
Props to all who will help review and refine this change.<search> element in core search markup.1 parent ac5e1ac commit ddb1363
2 files changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
325 | | - | |
| 325 | + | |
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
| |||
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
334 | | - | |
| 334 | + | |
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
| |||
0 commit comments