Skip to content

Commit 9c271fd

Browse files
committed
PR feedback: accessibility
1 parent 68df256 commit 9c271fd

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

static/css/v3/badge-button.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
height: fit-content;
1616
padding: 2px;
1717
display: inline-block;
18+
cursor: pointer;
19+
}
20+
21+
.badge-button input, img, label {
22+
cursor: pointer;
1823
}
1924

2025
.badge-button:has(.badge-button__radio:checked) {

templates/v3/includes/_badge_button.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@
2424
name="{{name}}"
2525
value="{{value}}"
2626
id="{{id|default:uuid}}"
27+
aria-labelledby="{{id|default:uuid}}_label"
2728
aria-checked="{{radio_checked|yesno:"true,false"|default:"false"}}"
29+
aria-pressed="{{radio_checked|yesno:"true,false"|default:"false"}}"
2830
{% if radio_checked %} checked {% endif %}
2931
/>
30-
<label for="{{id|default:uuid}}"><img src="{{ icon_src }}" alt="" width="32" height="32"></label>
32+
<label id="{{id|default:uuid}}_label" for="{{id|default:uuid}}"><img src="{{ icon_src }}" alt="" width="32" height="32"></label>
3133
</div>

0 commit comments

Comments
 (0)