Skip to content

Commit

Permalink
chore(checkbox): fix aria for checkbox list demo
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 607822159
  • Loading branch information
asyncLiz authored and copybara-github committed Feb 16, 2024
1 parent 4d26841 commit 87d7eac
Showing 1 changed file with 37 additions and 26 deletions.
63 changes: 37 additions & 26 deletions checkbox/demo/stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,43 +38,54 @@ const withLabels: MaterialStoryInit<StoryKnobs> = {
styles: [
labelStyles,
css`
.column {
ol {
all: unset;
display: flex;
flex-direction: column;
}
li {
all: unset;
}
label {
gap: 0;
}
`,
],
render({disabled}) {
return html`
<div class="column" role="group" aria-label="Animals">
<label>
<md-checkbox
?disabled=${disabled}
aria-label="Cats"
touch-target="wrapper"></md-checkbox>
Cats
</label>
<label>
<md-checkbox
checked
?disabled=${disabled}
aria-label="dogs"
touch-target="wrapper"></md-checkbox>
Dogs
</label>
<label>
<md-checkbox
indeterminate
?disabled=${disabled}
aria-label="Birds"
touch-target="wrapper"></md-checkbox>
Birds
</label>
</div>
<ol aria-label="Animals">
<li>
<label>
<md-checkbox
?disabled=${disabled}
aria-label="Cats"
touch-target="wrapper"></md-checkbox>
Cats
</label>
</li>
<li>
<label>
<md-checkbox
checked
?disabled=${disabled}
aria-label="dogs"
touch-target="wrapper"></md-checkbox>
Dogs
</label>
</li>
<li>
<label>
<md-checkbox
indeterminate
?disabled=${disabled}
aria-label="Birds"
touch-target="wrapper"></md-checkbox>
Birds
</label>
</li>
</ol>
`;
},
};
Expand Down

0 comments on commit 87d7eac

Please sign in to comment.