-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1557 from /issues/1512@v2
radio, radio-group: improve JAWS readability
- Loading branch information
Showing
12 changed files
with
64 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 11 additions & 1 deletion
12
common.blocks/radio-group/radio-group.tmpl-specs/10-no_type_disabled_item.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,11 @@ | ||
<span class="radio-group radio-group_theme_islands radio-group_size_m control-group i-bem" data-bem="{"radio-group":{}}"><label class="radio radio_theme_islands radio_size_m i-bem" data-bem="{"radio":{}}"><span class="radio__box"><input class="radio__control" type="radio" autocomplete="off" name="default" value="1"/></span>first</label><br/><label class="radio radio_theme_islands radio_size_m radio_checked radio_disabled i-bem" data-bem="{"radio":{}}"><span class="radio__box"><input class="radio__control" type="radio" autocomplete="off" name="default" value="3" checked="checked" disabled="disabled"/></span>third</label></span> | ||
<span class="radio-group radio-group_theme_islands radio-group_size_m control-group i-bem" role="radiogroup" aria-label="." data-bem="{"radio-group":{}}"> | ||
<label class="radio radio_theme_islands radio_size_m i-bem" data-bem="{"radio":{}}"> | ||
<span class="radio__box"><input class="radio__control" type="radio" autocomplete="off" name="default" value="1"/></span> | ||
<span aria-hidden="true" class="radio__text">first</span> | ||
</label> | ||
<br/> | ||
<label class="radio radio_theme_islands radio_size_m radio_checked radio_disabled i-bem" data-bem="{"radio":{}}"> | ||
<span class="radio__box"><input class="radio__control" type="radio" autocomplete="off" name="default" value="3" checked="checked" disabled="disabled"/></span> | ||
<span aria-hidden="true" class="radio__text">third</span> | ||
</label> | ||
</span> |
11 changes: 10 additions & 1 deletion
11
common.blocks/radio-group/radio-group.tmpl-specs/20-type_button_disabled_group.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,10 @@ | ||
<span class="radio-group radio-group_type_button radio-group_disabled control-group i-bem" data-bem="{"radio-group":{}}"><label class="radio radio_type_button radio_disabled i-bem" data-bem="{"radio":{}}"><button class="button button_togglable_radio button_disabled button__control i-bem" aria-pressed="false" data-bem="{"button":{}}" role="button" type="button" disabled="disabled"><span class="button__text">first</span></button><input class="radio__control" type="radio" autocomplete="off" name="radio-group_type_button" value="1" disabled="disabled"/></label><label class="radio radio_type_button radio_disabled i-bem" data-bem="{"radio":{}}"><button class="button button_togglable_radio button_disabled button__control i-bem" aria-pressed="false" data-bem="{"button":{}}" role="button" type="button" disabled="disabled"><i aria-hidden="true" class="icon icon_social_vk"></i><span class="button__text">VK</span></button><input class="radio__control" type="radio" autocomplete="off" name="radio-group_type_button" value="2" disabled="disabled"/></label></span> | ||
<span class="radio-group radio-group_type_button radio-group_disabled control-group i-bem" role="radiogroup" aria-label="." data-bem="{"radio-group":{}}"> | ||
<label class="radio radio_type_button radio_disabled i-bem" data-bem="{"radio":{}}"> | ||
<button class="button button_togglable_radio button_disabled button__control i-bem" aria-pressed="false" data-bem="{"button":{}}" role="button" type="button" disabled="disabled"><span class="button__text">first</span></button> | ||
<input class="radio__control" type="radio" autocomplete="off" name="radio-group_type_button" value="1" disabled="disabled"/> | ||
</label> | ||
<label class="radio radio_type_button radio_disabled i-bem" data-bem="{"radio":{}}"> | ||
<button class="button button_togglable_radio button_disabled button__control i-bem" aria-pressed="false" data-bem="{"button":{}}" role="button" type="button" disabled="disabled"><i aria-hidden="true" class="icon icon_social_vk"></i><span class="button__text">VK</span></button> | ||
<input class="radio__control" type="radio" autocomplete="off" name="radio-group_type_button" value="2" disabled="disabled"/> | ||
</label> | ||
</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
block('radio').elem('text')( | ||
tag()('span'), | ||
attrs()(function() { | ||
return { 'aria-hidden' : true }; | ||
}) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = function(bh) { | ||
bh.match('radio__text', function(ctx) { | ||
ctx | ||
.tag('span') | ||
.attr('aria-hidden', true); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,10 @@ block('radio')( | |
val : ctx.val | ||
} | ||
}, | ||
ctx.text | ||
ctx.text && { | ||
elem : 'text', | ||
content : ctx.text | ||
} | ||
]; | ||
}) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
<label class="radio radio_checked radio_disabled i-bem" data-bem="{"radio":{}}"><span class="radio__box"><input class="radio__control" type="radio" autocomplete="off" name="radio" value="1" checked="checked" disabled="disabled"/></span>radio</label> | ||
<label class="radio radio_checked radio_disabled i-bem" data-bem="{"radio":{}}"> | ||
<span class="radio__box"><input class="radio__control" type="radio" autocomplete="off" name="radio" value="1" checked="checked" disabled="disabled"/></span> | ||
<span aria-hidden="true" class="radio__text">radio</span> | ||
</label> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
({ | ||
block : 'radio' | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<label class="radio i-bem" data-bem="{"radio":{}}"> | ||
<span class="radio__box"><input class="radio__control" type="radio" autocomplete="off"/></span> | ||
</label> |