Skip to content

Commit

Permalink
make-clickable docs
Browse files Browse the repository at this point in the history
  • Loading branch information
basher committed Nov 4, 2024
1 parent a9b4e71 commit c24a1cc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ui/src/css/components/_accordion.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Dependencies.
/* stylelint-disable-next-line selector-pseudo-element-no-unknown */
&::details-content {
block-size: 0;
transition: block-size $animation-medium,
content-visibility $animation-medium;
transition: block-size $animation-fast,
content-visibility $animation-fast;
/* stylelint-disable-next-line property-no-unknown */
transition-behavior: allow-discrete;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ import * as WebUIMakeClickable from './WebUIMakeClickable.stories';
<Canvas of={WebUIMakeClickable.WebUIMakeClickable} />

## Accessibility considerations
- CSS `focus-within` is utilised to add a focus indicator to the Web Component only when its primary link (i.e. `data-url`) receives keyboard `focus`.
- Based on [Inclusive Components cards](https://inclusive-components.design/cards/).
- Only the primary link's text is announced to screen readers when the Web Component receives focus.
- CSS `focus-within` adds a focus indicator to the component only when its primary link receives keyboard `focus`.
- The rest of the component's content, including any other nested interactive elements, all behave independently.
- Text selection is enabled within the component.

## Required and optional HTML or `data-` attributes

Attribute | Behaviour
--- | ---
`data-url` | Optional. Identifies the link whose URL is used for the click event. Fallback is the first link inside the Web Component.
`data-url` | Optional. Identifies the primary link whose URL is used for the click event. Fallback is the first link inside the Web Component.

0 comments on commit c24a1cc

Please sign in to comment.