Skip to content

Commit

Permalink
docs(ActionList): add a11y guidance around inline descriptions (#884)
Browse files Browse the repository at this point in the history
* docs(ActionList): add a11y guidance around inline descriptions

* docs(ActionList): add details on truncate react implementation
  • Loading branch information
francinelucca authored Nov 15, 2024
1 parent 9df0c60 commit 85ebf8f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions content/components/action-list.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,12 @@ The tooltip and optional dialog should be triggered by a button element that wra

</Box>

### Inline descriptions

All `ActionList.Description` are rendered inline (next to the label) by default. For the cases where the description is too long to fit within one line, the content will wrap to a new line. In some cases, it may be desired to have the description be truncated with an ellipsis. This can be achieved by setting the `truncate` prop on the `ActionList.Description` component. Please note that truncating an inline description is only acceptable if the full, non-truncated text can be seen in a subsequent page or screen. It is at the consumer's discretion to use this feature accessibily.

Please note the `truncate` option is currently implemented in Primer React only, and is not available in Primer View Components, where the `InlineDescription` will wrap by default.

### Known accessibility issues (GitHub staff only)

<AccessibilityLink label="ActionList"/>

0 comments on commit 85ebf8f

Please sign in to comment.