Skip to content

Commit

Permalink
Add note to checkbox def (#1657)
Browse files Browse the repository at this point in the history
Reference the native checkbox's strong native semantics / functionality and advise authors to use native features on the native element
  • Loading branch information
scottaohara committed Dec 9, 2021
1 parent 647ca11 commit 9653692
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1990,6 +1990,9 @@ <h2>Definition of Roles</h2>
<div class="role-description">
<p>A checkable input that has three possible <span>values</span>: <code>true</code>, <code>false</code>, or <code>mixed</code>.</p>
<p>The <sref>aria-checked</sref> <a>attribute</a> of a <code>checkbox</code> indicates whether the input is checked (<code>true</code>), unchecked (<code>false</code>), or represents a group of <a>elements</a> that have a mixture of checked and unchecked values (<code>mixed</code>). Many checkboxes do not use the <code>mixed</code> value, and thus are effectively boolean checkboxes.</p>
<p class="note">
Due to the strong native semantics of HTML's native checkbox, authors are advised against using <code>aria-checked</code> on an <code>input type=checkbox</code>. Rather, use the native <code>checked</code> attribute or the <code>indeterminate</code> IDL attribute to specify the checkbox's "checked" or "mixed" state, respectively.
</p>
</div>
<table class="role-features">
<caption>Characteristics:</caption>
Expand Down

1 comment on commit 9653692

@pkra
Copy link
Member

@pkra pkra commented on 9653692 Jul 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merged into stable during 1616c25

Please sign in to comment.