MDL-85467 core: Replace orphaned label with span for accessibility
This commit replaces orphaned labels with spans for improved accessibility. It also updates the XPATH partial named selector for select_menu fields to target span elements.
This commit is contained in:
@@ -34,9 +34,9 @@
|
||||
<span class="d-none" data-region="groupid" data-groupid="{{group}}"></span>
|
||||
<div class="align-items-center d-flex">
|
||||
<div class="d-block pe-3 text-truncate">
|
||||
<label class="d-block m-0 small" aria-hidden="true">
|
||||
<span class="d-block m-0 small" aria-hidden="true">
|
||||
{{label}}
|
||||
</label>
|
||||
</span>
|
||||
<span class="p-0 font-weight-bold" data-selected-option>
|
||||
{{selectedgroup}}
|
||||
</span>
|
||||
|
||||
@@ -338,7 +338,7 @@ XPATH
|
||||
XPATH
|
||||
,
|
||||
'select_menu' => <<<XPATH
|
||||
//*[@role='combobox'][@aria-labelledby = //label[contains(normalize-space(string(.)), %locator%)]/@id]
|
||||
//*[@role='combobox'][@aria-labelledby = //span[contains(normalize-space(string(.)), %locator%)]/@id]
|
||||
XPATH
|
||||
,
|
||||
],
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
}}
|
||||
<div class="dropdown select-menu" id="{{baseid}}">
|
||||
{{#label}}{{^inlinelabel}}
|
||||
<label id="{{baseid}}-label"{{#labelattributes}} {{name}}="{{value}}"{{/labelattributes}}>{{label}}</label>
|
||||
<span id="{{baseid}}-label"{{#labelattributes}} {{name}}="{{value}}"{{/labelattributes}}>{{label}}</span>
|
||||
{{/inlinelabel}}{{/label}}
|
||||
<div
|
||||
class="btn dropdown-toggle{{#inlinelabel}} d-flex text-left align-items-center p-0{{/inlinelabel}}"
|
||||
@@ -102,7 +102,7 @@
|
||||
{{#inlinelabel}}
|
||||
<div class="pr-3 text-truncate">
|
||||
{{#label}}
|
||||
<label class="d-block m-0 small" id="{{baseid}}-label"{{#labelattributes}} {{name}}="{{value}}"{{/labelattributes}}>{{label}}</label>
|
||||
<span class="d-block m-0 small" id="{{baseid}}-label"{{#labelattributes}} {{name}}="{{value}}"{{/labelattributes}}>{{label}}</span>
|
||||
{{/label}}
|
||||
<span class="font-weight-bold" data-selected-option>
|
||||
{{selectedoption}}
|
||||
|
||||
Reference in New Issue
Block a user