-
Notifications
You must be signed in to change notification settings - Fork 108
Document ARIA mappings for boolean and node-list properties #760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
blinding-pixels
wants to merge
1
commit into
AccessKit:main
Choose a base branch
from
blinding-pixels:Docs-boolean-node-properties
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+37
−9
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -1878,20 +1878,42 @@ vec_type_methods! { | |
| } | ||
|
|
||
| node_id_vec_property_methods! { | ||
| /// The ordered list of this node's direct children in the tree. | ||
| (Children, children, set_children, push_child, clear_children), | ||
| /// The nodes whose contents or presence are controlled by this node. ARIA | ||
| /// equivalent: [`aria-controls`]. | ||
| /// | ||
| /// [`aria-controls`]: https://www.w3.org/TR/wai-aria-1.2/#aria-controls | ||
| (Controls, controls, set_controls, push_controlled, clear_controls), | ||
| /// The nodes that provide detailed, extended descriptions for this node. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I feel like this documentation is too similar to the one for described_by. ARIA explains the link between the two and maybe we should do the same. |
||
| /// ARIA equivalent: [`aria-details`]. | ||
| /// | ||
| /// **Difference with ARIA:** `aria-details` references a single element, | ||
| /// while this property may reference multiple nodes. | ||
| /// | ||
| /// [`aria-details`]: https://www.w3.org/TR/wai-aria-1.2/#aria-details | ||
| (Details, details, set_details, push_detail, clear_details), | ||
| /// The nodes that describe this node. ARIA equivalent: [`aria-describedby`]. | ||
| /// | ||
| /// [`aria-describedby`]: https://www.w3.org/TR/wai-aria-1.2/#aria-describedby | ||
| (DescribedBy, described_by, set_described_by, push_described_by, clear_described_by), | ||
| /// The nodes that follow this node in an alternate reading order. ARIA | ||
| /// equivalent: [`aria-flowto`]. | ||
| /// | ||
| /// [`aria-flowto`]: https://www.w3.org/TR/wai-aria-1.2/#aria-flowto | ||
| (FlowTo, flow_to, set_flow_to, push_flow_to, clear_flow_to), | ||
| /// The nodes that label this node. ARIA equivalent: [`aria-labelledby`]. | ||
| /// | ||
| /// [`aria-labelledby`]: https://www.w3.org/TR/wai-aria-1.2/#aria-labelledby | ||
| (LabelledBy, labelled_by, set_labelled_by, push_labelled_by, clear_labelled_by), | ||
| /// As with the `aria-owns` property in ARIA, this property should be set | ||
| /// only if the nodes referenced in the property are not descendants | ||
| /// of the owning node in the AccessKit tree. In the common case, where the | ||
| /// owned nodes are direct children or indirect descendants, this property | ||
| /// is unnecessary. | ||
| /// Nodes owned by this node that are not already its descendants in the | ||
| /// tree. This property is unnecessary for direct children or other | ||
| /// descendants. ARIA equivalent: [`aria-owns`]. | ||
| /// | ||
| /// [`aria-owns`]: https://www.w3.org/TR/wai-aria-1.2/#aria-owns | ||
| (Owns, owns, set_owns, push_owned, clear_owns), | ||
| /// On radio buttons this should be set to a list of all of the buttons | ||
| /// in the same group as this one, including this radio button itself. | ||
| /// For a radio button, the list of all radio buttons in the same group, | ||
| /// including this node. | ||
| (RadioGroup, radio_group, set_radio_group, push_to_radio_group, clear_radio_group) | ||
| } | ||
|
|
||
|
|
@@ -2208,13 +2230,17 @@ coord_slice_property_methods! { | |
| } | ||
|
|
||
| bool_property_methods! { | ||
| /// Whether this node is expanded, collapsed, or neither. | ||
| /// Whether this node is expanded, collapsed, or neither. ARIA equivalent: | ||
| /// [`aria-expanded`]. | ||
| /// | ||
| /// Setting this to `false` means the node is collapsed; omitting it means this state | ||
| /// isn't applicable. | ||
| /// | ||
| /// [`aria-expanded`]: https://www.w3.org/TR/wai-aria-1.2/#aria-expanded | ||
| (Expanded, is_expanded, set_expanded, clear_expanded), | ||
|
|
||
| /// Indicates whether this node is selected or unselected. | ||
| /// Indicates whether this node is selected or unselected. ARIA equivalent: | ||
| /// [`aria-selected`]. | ||
| /// | ||
| /// The absence of this flag (as opposed to a `false` setting) | ||
| /// means that the concept of "selected" doesn't apply. | ||
|
|
@@ -2223,6 +2249,8 @@ bool_property_methods! { | |
| /// to announce "not selected". The ambiguity of this flag | ||
| /// in platform accessibility APIs has made extraneous | ||
| /// "not selected" announcements a common annoyance. | ||
| /// | ||
| /// [`aria-selected`]: https://www.w3.org/TR/wai-aria-1.2/#aria-selected | ||
| (Selected, is_selected, set_selected, clear_selected) | ||
| } | ||
|
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if the single word "ordered" here is enough. Maybe we should replace it by a second sentence to hammer the fact that the order must be chosen carefully as it directly influences how widgets are placed, akin to the tab index on a web page. Any idea?