Closed gregwhitworth closed 9 months ago
Pulling in @dbaron response from #725 here
I'm trying to follow up on the a11y issues in other (smaller, more focused) issues. I don't currently consider the work on the whole feature done, although @lukewarlow is probably right that remaining work doesn't belong in the Open UI CG (which exists to incubate ideas, not standardize all the details), but rather in some combination of WHATWG HTML issues and discussions on appropriate a11y specs (e.g., HTML-AAM or ARIA).
I'd also note that one aspect of the design here is that maintenance of HTML tends to be one of the most conservative web specifications regarding design of new features. This is at least partly by design, since lots of people want to add things to HTML. But in general, if you want to add a new thing to HTML (say, exclusive accordions) that has a decent resemblence to an existing thing in HTML (say, radio buttons), it's going to be a very uphill fight to make the new thing different from the existing thing unless there's a well known and well documented set of problems with the existing thing that the new approach fixes.
@dbaron since there are people interested in the Open UI community on having these accessibility issues solved can we have a top level issue that tracks them so that we can burn them down to completion (this may be an issue in WHATWG, here, etc)
With regards to the request in this issue, @yatil you mentioned user research in discord is any of the user research that you've done publicly available or a summary of the findings? If not, no worries I think it would be helpful to drive UA's toward a solution.
@yatil can you clarify something for me in this comment and apologies for my ignorance:
Currently, they can opt to open all details elements at once. Removing this feature for users on the author’s behalf makes the web less accessible.
Who is they in this context? I presume the end-user, and is this via a specific AT?
Some of this conversation is ongoing at https://github.com/w3c/html-aam/issues/509.
I agree this should have been sorted here before making it into the WHATWG HTML specification and I feel it now needs to be sorted at WHATWG HTML (not HTML-AAM) since it is already in the spec.
Anyway, maybe wrap all this up and make one issue/PR at WHATWG HTML or contribute to https://github.com/whatwg/html/issues/9899?
Currently, they can opt to open all details elements at once. Removing this feature for users on the author’s behalf makes the web less accessible.
Who is they in this context? I presume the end-user, and is this via a specific AT?
Users. All of them can opt to go through every details element and open each one after the other to see all content.
Regarding research: We did it when we worked on the W3C/WAI redesign, and it was pretty informal. No idea if that is available somewhere.
Here are some Nielsen Norman articles that go into it (emphasis theirs):
Using accordions on a content page can hinder users’ ability to access information from different content blocks. When a user needs to access information from most or all accordions, it can become tedious to have to expand each of them. Excessive clicking interrupts people’s interaction with the page. Forcing users to interact with each panel individually to access the information can lead to a loss of context when important details are scattered across different panels. Users may have difficulty connecting related information from different sections on the page.
This problem can further escalate when an accordion automatically closes when another is opened, restricting users’ ability to combine information from multiple accordions at the same time. If you expect users to need information from several accordions at once, it is better to display all the content at once (even if it results in a longer page).
from: https://www.nngroup.com/articles/accordions-on-desktop/
See also: https://www.nngroup.com/articles/accordions-complex-content/
UA ability for user to over-ride exclusive accordions functionality
I don't think that this should be added. Since the result of #786 was that they should always be exclusive. This would basically reverse that change - and may break authors' pages.
If authors want their accordion to 100% always be exclusive. Then they may implement their own accordion. Which could be inaccessible.
And if this was going to be added, then a preference of users wanting to override this should be available to JS, for custom accordions.
If authors want their accordion to 100% always be exclusive. Then they may implement their own accordion. Which could be inaccessible.
Exclusive accordions are ALWAYS inaccessible. The exclusiveness makes it… exclusive. There is no inclusive accordion that is exclusive like there are no wheel-chair accessible stairs. It is an oxymoron.
Since the result of #786 was that they should always be exclusive.
@YummyBacon5 the key difference here Vs what was discussed there is who's making the decision. That was around various authoring scenarios and how browsers handle them. This would be a user choice to say I don't care what the author wants, user choice coming above author choice is correct.
I don't agree that exclusive accordions are always inaccessible. I agree they have their challenges and are generally handled in better ways (usually by not using accordions). NNG does a good job outlining those challenges.
Incidentally, those challenges correspond to tabs / tab panels. I would urge everyone to read those two articles and replace "accordion" with "tabs" and decide for themselves if and how they correlate. Then consider maybe what lessons we have (or haven't) learned as a result and/or can apply here.
More importantly for the scope of the web platform, accordions exist in the wild already (for decades).
We can either let them continue to be implemented inconsistently (and definitely inaccessibly) using assorted frameworks and libraries that over-burden users, or we can do our best to specify a least-bad baseline.
Part of our role as accessibility practitioners is to ensure existing patterns are at least as accessible as we can make them, while also urging clients (devs, stakeholders, people named Frank, etc.) to move to better paradigms and patterns.
All that said, I am in favor of:
[Edited to break that last paragraph into a numbered list because my run-on sentence confused me when I came back to read it and likely confused others as well, kinda like this one is doing right now]
I don't agree that exclusive accordions are always inaccessible.
There might be use cases where the impact is lessened, but I have never observed a user who was glad that they could only see one piece of information.
And yes, these accordions exist. And yes, building them on this common pattern makes sense. But to make it worthwhile for users, there should be a way to lessen their impact.
There might be use cases where the impact is lessened, but I have never observed a user who was glad that they could only see one piece of information.
I have, but those were on awful overloaded pages where the accordion was thrown at it versus an IA overhaul (users with dyslexia, ADHD, anxiety benefited from them). Typically screens with financial bits.
And yes, these accordions exist. And yes, building them on this common pattern makes sense. But to make it worthwhile for users, there should be a way to lessen their impact.
My sad effort to try to flesh out some ideas here to maybe then port over to WHATWG HTML:
I don’t know the answers to this question. One would need to research this. I don’t know if WHATWG is the right venue for this, considering it’s a User Agent feature.
Do you believe allowing users to override displaying only one a time is the only approach?
I also mentioned an expand all/collapse all functionality which should exist for non-exclusive details anyway (IMHO). But I don’t know if this is functionally different.
Might devs just fall back to problematic tab patterns (which do not allow for overriding their exclusiveness)?
We both know that developers often use bad UI. And I’m a realist when I say I want devs to have this functionality. Give it to them. But also allow users to see all content. Bury that functionality somewhere if needed to make developers (and project managers) happy. I know that this is most important. It works for autoplaying video, something similar should be available here.
(I think users should have the option to linearize tabs, too, but that is another discussion. I will raise that issue when native tabs are introduced to the web platform. Also, if the user has the option to set the behavior for these accordions, they could decide that they only ever want one open at all times. User control is a good thing here.)
Is there guidance that can be folded in that says these should restricted to specific use cases (knowing authors are gonna author)?
My general advice has been to structure the content in a way so that accordions are not needed. And I have worked for W3C/WAI, which is basically a site littered with expand/collapse texts. So I know the struggle with legacy content or with editors who insist to use a specific structure.
I don’t think any of my responses have been helpful, and I really apologize for that. I should probably not have brought it up and cause a stir. I’m sorry.
I hate accordions (and tabs). [Most of the time—I've seen them both used well but that's the exception not the rule]
The primary benefit to me of native accordions is that it'll be easy to write a bookmarklet to break them by removing the name attribute. That will be easier than opening the same page in multiple windows or popping open dev tools to break things.
If I could, say, middle click to open a pane without the others closing that would save me from adding another bookmarklet to my fix folder.
Numbered and excerpted for my benefit...
- I don’t know the answers to this question. One would need to research this.
Fair enough. It was a loose question so I am open to others answering with ideas too.
1.b. I don’t know if WHATWG is the right venue for this, considering it’s a User Agent feature.
At the very least, WHATWG HTML may need to identify what the parsing/exposure rules are when the feature provided by using the name
attribute is disabled. For example, keep enumeration, grouping, etc., but also expose all as open versus just exposing the first as opened to platform APIs.
- We both know that developers often use bad UI. […] I think users should have the option to linearize tabs, too, but that is another discussion. […]
It might be worth pursuing both (accordion and tab linearization strategies in UAs) in tandem to help ensure UAs approach it consistently and authors are not motivated to choose the wrong pattern just to get around an affordance.
- My general advice has been to structure the content in a way so that accordions are not needed. […]
That might indeed be the best and most straightforward advice. WHATWG HTML might need to be a almost prescriptive in other patterns / approaches to use (which, IMO, it already does so there is precedent).
I don’t think any of my responses have been helpful, and I really apologize for that. I should probably not have brought it up and cause a stir. I’m sorry.
My questions were not exactly insightful either. And there is no need to apologize. Accessibility advocacy is typically a function of many prior lost battles and wounds. These are human outcomes for which we are trying to solve, not just minor linter-level code preferences. Frustration is, unfortunately, part of that and sometimes it oozes out.
https://jsfiddle.net/qv2b5o03/ - I had a quick attempt at misusing exclusive accordions for a (mostly) JS free tab implementation last night, requires Chrome canary to work. But the accessibility mappings all seem to work correctly (Tested on Android and macOS) and I thought it was worth bringing up here as something that would break if exclusive accordion behavior was disabled.
Not arguing whether this is a good UI pattern but it is one and if I worked it out others probably will so just something to consider for the conversation.
@lukewarlow Other than a novel experiment/gag (one which others have also parodied), I am not sure yet another defailts/summary mis-use (which will absolutely happen in the wild) is a sufficient argument for or against the exclusive accordion pattern.
It's certainly not a gag? it's me attempting to see what this pattern allows and while tbf I said misusing, if it's fully accessible (fair enough if it doesn't work with jaws or something else I can't test those) is it really misusing?
I'm also not arguing for or against I'm just saying this is possible and an override would break it. It's important to consider all use cases when coming to a decision.
is it really misusing?
In terms of what HTML says about what different elements mean semantically, then yes
It's certainly not a gag?
Oh, my apologies. I sincerely thought you were having fun with me.
It's important to consider all use cases when coming to a decision.
Regardless, does that give you some insight into how (or if) that kind of expectation should be qualified within the spec? Or with UAs?
In terms of speccing / guidance surrounding a UA override potentially the UA override only applies to details elements with their standard group role?
Thus handling this use case.
Again just an idea not sure if that's good or bad.
In terms of speccing / guidance surrounding a UA override potentially the UA override only applies to details elements with their standard group role?
It's an idea, though the group role is likely not happening. The name
attribute matching would be it. But since that would exclude exclusive accordions (heh) I don't think that hits at the meat of what Eric suggested.
Maybe just a blanket UA "expand every details/summary" command with the appropriate warning that it will break some pages (particularly those that use AJAXy requests that expect certain states/properties otherwise they fall down).
In which case it becomes a feature request of Mozilla, WebKit, and Chromium, and not a spec edit.
Or am I over-simplifying?
Yeah this comes back to my original response that I don't know if this sort of request is within the scope of what HTML can mandate. (For the record I think specs should have more power to say hey actually do this but alas)
We'll discuss on the call later and then we'll have a more concrete understanding.
The Open UI Community Group just discussed [accordion] UA ability for user to over-ride exclusive accordions functionality
.
Thanks to the CG for the open discussion.
I commented on the other issue and more or less stated the same thing as @aardrian said here:
I would urge everyone to read those two articles and replace "accordion" with "tabs" and decide for themselves if and how they correlate.
and expounded on what @YummyBacon5 said here:
If authors want their accordion to 100% always be exclusive. Then they may implement their own accordion. Which could be inaccessible.
The OpenUI project seeks to make it easier for web developers to build these controls so that the browser engines can make them functional and accessible without any extra work needed from the (sometimes ignorant, or sometimes unwilling) web developer.
Ultimately it's going to be up to the web developer to decide what common UI pattern they choose, and this OpenUI feature takes an existing pattern and makes it more accessible than before for assistive technology users. As specific problems arise and are discovered, they can be made more accessible in the engine, rather than requiring the web developer or framework developer to update.
As for whether there should be a user switch to disregard the exclusivity of this pattern, I think the auto-expanding details approach would be a better path forward.
As for whether there should be a user switch to disregard the exclusivity of this pattern, I think the auto-expanding details approach would be a better path forward.
Unsure how automatic opening of details when searching helps for having two details open at the same time. I guess I'm just not understanding things enough.
Unsure how automatic opening of details when searching helps…
As one specific use case, one of your justification examples for why an override feature is necessary was ~"screen reader user needs to be able to navigate by heading, even if those headings are in collapsed sections."
Instead of needing to 1a) expand all, or 1b) change a user default, and then 2) navigate by heading, the auto-expanding details proposal would allow the user to just navigate by heading as they normally would.
Yes, Assistive Tech can help some users. It does not support users who do not use assistive tech.
I created a PR at https://github.com/whatwg/html/pull/10003 to try to address the action item here. Suggestions for improving the wording are welcome, and probably best there rather than here.
Closing on the basis of the above PR being merged.
Originally posted by @yatil in https://github.com/openui/open-ui/issues/725#issuecomment-1788750341