About this set
An expense claims table where each row opens a detail line underneath it, an accordion built inside a table. The claim number in the first cell is a real button with aria-expanded and aria-controls pointing at its detail row, and a click anywhere else on the row presses that button, so mouse users get a large target while keyboard and screen reader users get a proper disclosure control. A small triangle rotates 90 degrees when the row is open. The detail row spans all four columns and holds a short description of the claim. In the plain CSS and Tailwind versions it animates open by moving grid-template-rows from 0fr to 1fr, which fits text of any length without a fixed max-height, and it stays visibility:hidden while closed so its text is not read out. The Bootstrap version uses the Collapse plugin with data-bs-toggle=”collapse”, which keeps aria-expanded in sync for you. Use it for orders, transactions and support tickets where the extra detail is useful but would crowd the main table.
What’s included
- Disclosure buttons with aria-expanded and aria-controls
- Whole row is clickable, the button handles the keyboard
- Height animation with grid-template-rows, no fixed max-height
- Closed details hidden from screen readers
- Bootstrap Collapse plugin version
Accessibility
Each claim number is a button that reports its expanded state and controls the detail row below. Closed details are visibility:hidden (display:none in Bootstrap), so they are skipped until opened. Buttons show a 2px amber focus outline, and the chevron, row and height transitions are removed under prefers-reduced-motion.
Customise it
Colours are in the .xp rules: header #faf6f0, detail background #faf6ef, chevron #9c8b72, focus #b45309; the open speed is the .25s on .xp-inner. Bootstrap uses --bs-table-* variables on .xp; in Tailwind edit duration-[250ms] and the colour utilities.




















