Skip to content
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

Exclusive accordion (<details name="">) #866

Closed
1 task done
dbaron opened this issue Jun 22, 2023 · 4 comments
Closed
1 task done

Exclusive accordion (<details name="">) #866

dbaron opened this issue Jun 22, 2023 · 4 comments

Comments

@dbaron
Copy link
Member

dbaron commented Jun 22, 2023

こんにちは TAG-さん!

I'm requesting a TAG review of exclusive accordions (<details name="">).

This feature adds a name attribute to the HTML details element so that multiple details elements (disclosure widgets) can be linked into an exclusive accordion, i.e., a widget where opening one of the details elements closes the others.

Further details:

  • I have reviewed (and was previously involved in editing) the TAG's Web Platform Design Principles
  • Relevant time constraints or deadlines: none specifically, though as noted in some of the above urls, one of the ideas behind this feature is to avoid some of the problems with CSS Toggles by instead working on small features that can move faster.
  • The group where the work on this specification is currently being done: Open UI Community Group and WHATWG
  • The group where standardization of this work is intended to be done (if current group is a community group or other incubation venue): WHATWG
  • Major unresolved issues with or opposition to this specification:
    • There are still a few unresolved issues discussed in the HTML PR, though I wouldn't characterise them as major.
    • There are existing issues with the <details> element that I hope to work on in parallel, falling into two categories:
      • Accessibility: There are a number of accessibility issues with the <details> and <summary> elements (really mostly relating to <summary>). While there are a bunch of links in different issues trackers, I'm currently working on a document trying to describe and categorize these problems that I hope to be able to share within a few weeks. I do hope to make some progress on these issues in parallel with this work, although I also don't think it's realistic to promise to "fix everything", but I do think it feels like there's a realistic path towards making significant improvements. These do represent real risk since it's possible this feature could increase usage of <details> and <summary> and thus expose these problems to more users.
      • Styleability: A major reason that <details> and <summary> aren't used as widely as they could be is insufficient styleability. I've started a document on what needs to be improved and how. I also hope to work on this in parallel, though I think it's worth trying to avoid getting these fixes landed too far in advance of the accessibility fixes.
  • This work is being funded by: Google

You should also know that the current state of the prototype can be tested in current Chrome Canary or Dev, or in the future in Beta (within a week) or Stable (in a month or so) once they reach version 116, but only if you enable "Experimental Web Platform Features" in chrome://flags .

We'd prefer the TAG provide feedback as (please delete all but the desired option):
💬 leave review feedback as a comment in this issue and @-notify @dbaron

@plinss
Copy link
Member

plinss commented Aug 2, 2023

The handling of print here feels a bit awkward, it'd be nice if there was a way to force the details open via a media query. We do note that this also appears to be an issue with plain details elements so don't see this as a blocker.

@atanassov
Copy link

Following the links to a11y related issues with selection and Summary element, it's unclear to me if introducing this behavior will increase the problem or help. Please consider further engagement in the related issues.

@hober
Copy link
Contributor

hober commented Aug 2, 2023

@plinss, @atanassov, and I took a look at this during the TAG's vF2F this week. See their comments above for specific bits of feedback. Overall, we're really happy with the simple, incremental approach you've taken here to add this feature to HTML. It fits right in with the existing use of name="" for radio buttons and checkboxes, and it doesn't require authors to change the existing structure of their documents. Thanks for bringing this to us for review!

@hober hober closed this as completed Aug 2, 2023
@hober hober added Resolution: satisfied with concerns The TAG is satisfied with this work overall but requires changes Venue: WHATWG Topic: HTML Progress: review complete labels Aug 2, 2023
@dbaron
Copy link
Member Author

dbaron commented Sep 28, 2023

Thanks for the review.

A few (somewhat delayed) repsonses:

  • The ability to force a details open (visually, at least, not semantically) in print styles is something that is possible with the current prototype I've been working on for my details styling work, though that's still at an earlier stage. I agree it's largely orthogonal to this particular feature, though.
  • I have been trying to continue to engage in the a11y-related issues, and hope to be able to spend a bit more time on that relatively soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants