Skip to content

Commit 90d5eb1

Browse files
committed
Improve roles examples
1 parent 3ecff92 commit 90d5eb1

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

apps/components_guide_web/lib/components_guide_web/templates/accessibility_first_testing/roles-cheatsheet.html.eex

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
<div class="ml-64">
2323
<section aria-label="Roles Cheatsheet" class="container px-4 pt-8 pb-16 text-2xl">
2424

25+
<%= link_to("List of roles", to: "https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques") %>
26+
2527
<article>
2628
<h2 id="link" class="mb-2 text-4xl leading-normal text-teal-800">Link</h2>
2729
<%=
@@ -54,12 +56,12 @@
5456
<h2 id="checkbox" class="mb-2 text-4xl leading-normal text-teal-800">Checkbox</h2>
5557
<%=
5658
"""
57-
getByRole('button', { name: 'Click me' });
59+
getByRole('checkbox', { name: 'Remember me' });
5860
""" |> code_block(:js)
5961
%>
6062
<%=
6163
"""
62-
<button>Click me</button>
64+
<label><input type=checkbox> Remember me</label>
6365
""" |> code_block(:html)
6466
%>
6567
</article>
@@ -68,12 +70,14 @@
6870
<h2 id="radio" class="mb-2 text-4xl leading-normal text-teal-800">Radio</h2>
6971
<%=
7072
"""
71-
getByRole('button', { name: 'Click me' });
73+
getByRole('radio', { name: 'Blue' });
7274
""" |> code_block(:js)
7375
%>
7476
<%=
7577
"""
76-
<button>Click me</button>
78+
<label><input type=radio> Purple</label>
79+
<label><input type=radio> Blue</label>
80+
<label><input type=radio> Orange</label>
7781
""" |> code_block(:html)
7882
%>
7983
</article>

0 commit comments

Comments
 (0)