diff --git a/src/pages/components/code-snippet/accessibility.mdx b/src/pages/components/code-snippet/accessibility.mdx index 2a57c375d7a..9739338da46 100644 --- a/src/pages/components/code-snippet/accessibility.mdx +++ b/src/pages/components/code-snippet/accessibility.mdx @@ -19,13 +19,15 @@ import { -No accessibility annotations are needed for code snippets, but keep these considerations in mind if you’re modifying Carbon or creating a custom component. +No accessibility annotations are needed for code snippets, but keep these +considerations in mind if you’re modifying Carbon or creating a custom +component. What Carbon provides - Developer considerations + Development considerations ## What Carbon provides @@ -35,8 +37,8 @@ accessibility considerations. ### Keyboard interaction -For all three variants, the code snippet can be copied with `Space` or `Enter`. Arrow -keys can operate scroll bars. +For all three variants, the code snippet can be copied with `Space` or `Enter`. +Arrow keys can operate scroll bars. @@ -46,7 +48,8 @@ keys can operate scroll bars. -By default, each inline code snippet is reachable by `Tab` and copied with `Space` or `Enter`. +By default, each inline code snippet is reachable by `Tab` and copied with +`Space` or `Enter`. @@ -56,7 +59,8 @@ By default, each inline code snippet is reachable by `Tab` and copied with `Spac -The single line code snippet tabstop supports left and right arrow key scrolling. +The single line code snippet tabstop supports left and right arrow key +scrolling. @@ -66,13 +70,14 @@ The single line code snippet tabstop supports left and right arrow key scrolling -The multi-line’s buttons are reachable by `Tab` and activated with `Space` or `Enter`. +The multi-line’s buttons are reachable by `Tab` and activated with `Space` or +`Enter`. ### Labeling and updates Carbon provides the copy button's default label and tooltip behavior. Carbon -handles notices about the success of the copy function, as well as updates to the -Show more mechanism. +handles notices about the success of the copy function, as well as updates to +the Show more mechanism. @@ -94,9 +99,9 @@ The code snippet’s buttons expose their labels on hover or focus. The results of activating buttons are provided in text. -## Developer considerations +## Development considerations Keep this in mind if you’re modifying Carbon or creating a custom component: -* the inline code text is implemented as a button so its text can be copied -* single line snippets take an additional tabstop to support arrow key scrolling +- the inline code text is implemented as a button so its text can be copied +- single line snippets take an additional tabstop to support arrow key scrolling diff --git a/src/pages/components/code-snippet/images/code-snippet-accessibility-2.png b/src/pages/components/code-snippet/images/code-snippet-accessibility-2.png index 211a5801692..8120e362131 100644 Binary files a/src/pages/components/code-snippet/images/code-snippet-accessibility-2.png and b/src/pages/components/code-snippet/images/code-snippet-accessibility-2.png differ diff --git a/src/pages/components/data-table/accessibility.mdx b/src/pages/components/data-table/accessibility.mdx index 33300bb3c28..2e28a2d8a77 100644 --- a/src/pages/components/data-table/accessibility.mdx +++ b/src/pages/components/data-table/accessibility.mdx @@ -8,23 +8,29 @@ tabs: ['Usage', 'Style', 'Code', 'Accessibility'] -Design annotations are needed for specific instances shown below, but for the standard data table component, Carbon already incorporates accessibility. +Design annotations are needed for specific instances shown below, but for the +standard data table component, Carbon already incorporates accessibility. What Carbon provides - Design annotations - Developer considerations + Design recommendations + Development considerations ## What Carbon provides -Carbon bakes keyboard operation into its components, improving the experience of blind users and others who operate via the keyboard. Carbon incorporates many other accessibility considerations, some of which are described below. +Carbon bakes keyboard operation into its components, improving the experience of +blind users and others who operate via the keyboard. Carbon incorporates many +other accessibility considerations, some of which are described below. ### Keyboard interaction -There are three data table variants with different interactions. Optional features like column sorting can appear in any of the variants. Table [pagination](https://www.carbondesignsystem.com/components/pagination/usage/) is treated as a separate component. +There are three data table variants with different interactions. Optional +features like column sorting can appear in any of the variants. Table +[pagination](https://www.carbondesignsystem.com/components/pagination/usage/) is +treated as a separate component. @@ -34,11 +40,15 @@ There are three data table variants with different interactions. Optional featur -For sortable tables, the column headers are reachable by `Tab` and sortable with `Space` or `Enter`. +For sortable tables, the column headers are reachable by `Tab` and sortable with +`Space` or `Enter`. ### Controls inside tables -Any interactive controls in data cells are in the tab order and maintain normal keyboard operation. This also applies to expandable table rows, which operate in the same manner as [accordions](https://www.carbondesignsystem.com/components/accordions/usage/) +Any interactive controls in data cells are in the tab order and maintain normal +keyboard operation. This also applies to expandable table rows, which operate in +the same manner as +[accordions](https://www.carbondesignsystem.com/components/accordions/usage/) @@ -48,11 +58,13 @@ Any interactive controls in data cells are in the tab order and maintain normal -Links, inputs, and other interactive controls inside tables operate by keyboard as normal. +Links, inputs, and other interactive controls inside tables operate by keyboard +as normal. -### Labelling and updates +### Labeling and updates -If columns are sortable, the sort symbols appear on hover or focus. A sorted column retains an indicator until it is no longer sorted. +If columns are sortable, the sort symbols appear on hover or focus. A sorted +column retains an indicator until it is no longer sorted. @@ -62,11 +74,14 @@ If columns are sortable, the sort symbols appear on hover or focus. A sorted col -Sort indicators appear on hover and focus. A sorted column is indicated visually. +Sort indicators appear on hover and focus. A sorted column is indicated +visually. -## Design annotations +## Design recommendations -Since there is no persistent visual indicator that a table is sortable, designers need to annotate if a table should be implemented with sortable column headers. +Since there is no persistent visual indicator that a table is sortable, +designers need to annotate if a table should be implemented with sortable column +headers. @@ -78,9 +93,11 @@ Since there is no persistent visual indicator that a table is sortable, designer Annotate if a table is sortable. -## Developer considerations +## Development considerations Keep this in mind if you’re modifying Carbon or creating a custom component: -* Column sorting indicators are matched programmatically using `aria-sort` -* See the [ARIA authoring practices](https://www.w3.org/TR/wai-aria-practices-1.2/#table) for more considerations +- Column sorting indicators are matched programmatically using `aria-sort` +- See the + [ARIA authoring practices](https://www.w3.org/TR/wai-aria-practices-1.2/#table) + for more considerations diff --git a/src/pages/components/data-table/images/datatable-accessibility-3.png b/src/pages/components/data-table/images/datatable-accessibility-3.png index d1bd3e17001..52f432ab7f6 100644 Binary files a/src/pages/components/data-table/images/datatable-accessibility-3.png and b/src/pages/components/data-table/images/datatable-accessibility-3.png differ