-
Notifications
You must be signed in to change notification settings - Fork 125
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
Secondary actions on items in composite widget roles #1440
Comments
spitballing here, but i wonder if there couldn't be some sort of special allowances to secondary related controls, as long as they had a programmatic association with the required children - theoretically giving them a reason to be there. using the tab with a close button example, having those as nested children is weird. but they aren't allowed children of a tablist. but what if there were a special allowance where if, say, the button had an
but the following "would"
please, feel free to poke all the holes in this. just first thing that came to mind, and would give |
See: #1385 |
@scottaohara I like your idea :). I'm not sure exactly how it'd be defined in spec language, but I'd be in favor of some sort of Allowed Child Elements thing that replaces Required Owned Elements, and has a list of roles + some term for anything associated via aria-controls. @JAWS-test I saw that issue, and it's definitely helpful to link the two to illustrate that secondary actions is a common issue that many people run in to :). That said, this issue is more about how include buttons that are visually present in the accessibility tree, which wouldn't be solved with an attribute -- specifically non-screen reader use cases like keyboard interaction and voice control, screen reader touch exploration, and expectations of sighted screen reader users. I think the attribute is an interesting idea, but it makes sense to discuss the two separately. |
If they are children, won't screen readers then have to present the tab or treeitem as a container? When reading via touch or reading cursor, we'd ideally want the action buttons as siblings, hopefully associated siblings so the screen reader can tell you that the button is delte for tabx or for treeitem named x or something like that. If they are children of the tab or treeitem, they effect accname calc. if they are not children, then we don't have to worry about name calc. If they are siblings of the item but still inside the composite, the browsers will have to do some fancy footwork to address indexing, i.e., posinset. I wish I could attend the deep dive. Looking forward to the outcome. I'm super concerned about screen reader expectations if they are children of the item though. |
It would be nice to have some sort of clear pattern and standardized role for this sort of thing. As long as we keep it distinct, because I don't want to break linting checks for nested interactive elements. |
As a screen reader developer, I think that such controls are more naturally/conceptually children of the widget they control; not siblings. And while I agree with @mcking65 that we need to be concerned about screen reader expectations, I also think we should do some debugging (i.e. in the browsers and where possible the screen readers) to determine why something isn't working as we expect before we conclude a particular approach is the wrong one. |
Any update on this @smhigley? We're seeing this in some of our code as well and would love to align where possible. |
As a data point, the Chrome address bar suggestions and Google search suggestions can have additional actions as you up/down arrow. For example, a Remove (from future suggestions) button and/or "Switch to tab" (if already open). |
Here's an attempt at somewhat-cohesive notes for discussion on thursday: Pros and Cons of each approach:Sibling pros
Sibling cons
Nested approach pros
Nested approach cons
Possible options for handling nested secondary actions and naming:
Outstanding questions:If we go with nested actions, what do people do in the meantime? For browser vendors: how hard would it be to use either an |
Don't forget the context menu of an item to access item-specific functions. |
Not agree on last sentence. Imagine a tree with additional non-presentational content in nodes where each node reminds you so. Horrible. |
@stes-acc That's why this bug is important, to find a better way. It's not as bad as you say, if you try it, but that's not related to this issue. |
@stes-acc I haven't forgotten the context menu :). That has been one keyboard mechanism we've tried as a way to give access to what are visually secondary buttons on an item. The problems are:
|
Well then MS should better stop context menu support in their UIs? But joking aside, context menus are a valuable redundant fallback for people that a) know (and expect!) them and b) are always keyboard accessible as an alternative if discussions on this topic will lead to nirvana.. BTW, I propose entering into a focused item with F2 (Excel dig into cell approach), Tabbing in between multiple active subitems, Shift+F2 to refocus item and TAB to finally skip the entire thing. In this sense, TAB acts as a free skipping key as before and we have no disruption in expected behaviour. |
@stes-acc I like the idea of using F2 to dig into the cell. This aligns with our technique for navigating or editing inside of grid cells (https://www.w3.org/TR/wai-aria-practices-1.1/#gridNav_focus). I can see this working some roles like |
Note that due to https://bugs.webkit.org/show_bug.cgi?id=213953 it is currently impossible to trigger a context menu when using VoiceOver for iOS AFAIK. Hopefully that gets fixed at some point. |
@smhigley wrote:
Apologies for missing this suggestion. I reviewed the issue last week, but didn't see your recent comments before the meeting. I think With one caveat:
If this refers to DOM nesting, the API shouldn't be limited to nested elements. The IDREFS should work with any DOM element (nested, siblings, or in a different part of the DOM entirely). This pattern would also allow reflection to |
Also mentioned in the other issue comment, there's a potential to avoid "AT detection" by exposing some mainstream browser UI... Proposals have linked an action trigger to some visual UI element using a clickable DOM element (button, etc), like the following example screen shot. Screen shot from Gmail showing secondary hover actions But the example buttons in the screen shot aren't displayed at all times; only when a mouse user hovers. So if a web app detected a click on the actioning element when it was still hidden, the sequence could out a user of assistive technology, violating WPDP §2.9. A possible path forward may be to make this a native HTML feature (e.g. |
Now that Primary feedback so far is that this shouldn't be limited to specific composite ARIA widgets. That's unnecessarily limiting. A global attribute (with exclusions for the As one example where this might be used outside an ARIA composite widget context, the native |
Thanks @cookiecrook! Also great point about For anyone following along, I wrote up a more specific proposal for secondary actions and |
Specific proposal to discuss (based on previous discussions & the gist): Add specific
|
This seems like it would require the use of Regarding children presentational, I'll comment in #1174 as these points are related |
We need an end-to-end strategy that includes working with AT vendors, brainstorming good user experiences, determining priorities, creating examples, and spending the time to drive the project to completion within ATs. We've attempted to do that for aria-details/annotations with some success. Here's a document that came together -- it started as a brainstorming doc, and was circulated until we collected the best ideas and could prioritize them: |
Is there anything that can be done to help with progressing the aria-actions proposal? Some of us in openUI are interested in working on native tab UI and secondary actions is currently a big unsolved issue. |
Not sure if it fits here, or whether it is handled adequately by |
Can we also please discuss what role according to the ARIA group those clickable icons representing secondary actions should have? These often appear in control contexts where role nesting is forbidden (e.g. close buttons in tabs). Declaring those clickable icons presentational or aria-hidden or img does not help since they are active and deserve a role name that expresses that they are actionable. This is also helpful for tools (code parsers) to check other attributes (such as WCAG minimum size requirements for active controls). The world needs good advice what to do here. |
Hi, I heard about this from Adam Page, via Francis Storr... Adam suggested I pass along my questions about aria-actions here.
|
`aria-actions` is a new proposed property that identifies secondary action elements inside a composite interactive widget. An example of this pattern is close button in tabs. This property allows authors to surface the actions directly for discoverability. In the example, when a screen reader user focuses on a tab, they should know that the close button exists. This CL implements the mapping for this property for ATK/AT-SPI using the AtkAction interface. Future CLs will handle - the remaining API mappings - IDL related updates - restrictions on edge cases - has-actions attribute https://chromestatus.com/feature/5161589307867136 w3c/aria#1440 w3c/aria#1805 Change-Id: I8702d279fcf0961c84360d0609b0f2a20d9c049c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5925796 Reviewed-by: Alex Rudenko <[email protected]> Reviewed-by: Dominic Farolino <[email protected]> Commit-Queue: Jocelyn Tran <[email protected]> Reviewed-by: Aaron Leventhal <[email protected]> Code-Coverage: [email protected] <[email protected]> Reviewed-by: Scott Haseley <[email protected]> Cr-Commit-Position: refs/heads/main@{#1376934}
This new state is set to true if the aria-actions attribute is present and indicates that actions may exist on an element. has-actions is mapped for IA2 and UIA. https://chromestatus.com/feature/5161589307867136 w3c/aria#1440 w3c/aria#1805 Change-Id: I6260d4b047e57b09d078d03822e9bc14bb5fabab Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5985212 Reviewed-by: Ken Buchanan <[email protected]> Commit-Queue: Jocelyn Tran <[email protected]> Reviewed-by: Aaron Leventhal <[email protected]> Reviewed-by: David Tseng <[email protected]> Cr-Commit-Position: refs/heads/main@{#1379356}
I've been repeatedly running into a difficulty between a relatively common app UI pattern and the required owned elements part of the ARIA spec. The problem is specifically with secondary actions with composite interactive widget roles. I'm using "secondary action" to refer to cases where the child of the composite widget role (e.g. tab, treeitem, option, etc.) performs a primary action that makes sense for its role, but then also has secondary actions like edit/delete/etc., exposed through an associated button.
Here are some examples of UI that have this pattern:
Context menu approach
A solution we've used in the past was to make the visual buttons presentation-only, and duplicate all secondary actions in a context menu. The problem is the context menu wasn't sufficiently discoverable in practice, and sighted users who relied on keyboard navigation (either with or without a screen reader) expected to be able to directly reach the visible buttons.
If a context menu alone were a good approach, this would be covered by #762, but the discoverability problem is enough to make me think there needs to be a pattern for surfacing the secondary action buttons directly.
Nested vs. sibling options
Exposing the buttons directly runs into two spec + support problems:
I did some testing of practical support for nested vs. sibling buttons within composite widgets, with both the working test cases and results tables on this test page. It seems to pretty clearly come down on the side of sibling buttons having better support.
Aside from the test results, I don't personally have much of an opinion on the specific approach used, but I think we have a strong need for explicitly defining some sort of pattern defined for these cases.
The text was updated successfully, but these errors were encountered: