List
How it works
Different List elements are used to add structure to a group of related information. The List Carbon component provides both an ordered list and an unordered list which can contain nested lists. It’s important to understand that different types of lists are used to group information according to its nature to provide orientation for users. Ordered lists are used for sequential information and are automatically enumerated by the browser. Unordered lists are used when the order of the items is not relevant and are marked with bullets.
Accessibility considerations
This component has been validated to meet the WCAG 2.0 AA and Section 508 accessibility guidelines, however changes made by the content owner can affect accessibility compliance. Be sure to review and follow the guidance in this section when updating or adding new content to this component.
- Ensure content such as HTML elements and form controls are included using the appropriate Carbon Components and tested for accessibility.
- Lists should not be used for visual indentation or layout purposes.
Resources
Helpful resources for creating customized accessible implementations
- W3C Content Structure tutorial covers the usage of lists.
- IBM Accessibility Checklist - Checkpoint 1.3.1 Info and Relationships (WCAG Technique H48)
Accessibility testing
Accessibility issues are tracked in the Carbon Component GitHub repository.
Automated test
- Chrome version 77.0.3865.90
- Dynamic Assessment Plugin version 1.8.0.0 - IBM Accessibility WCAG 2.1 Sept. 2019 Ruleset
- Carbon React version 7.7.1
- No Violations
macOS Screen reader tests
- Chrome version 77.0.3865.90
- Carbon React version 7.7.1
- Control-Option-Right Arrow to read the first list item. VO announces that there are three items in the list, then reads the item number, position, and text.
- Control-Option-Right Arrow to read the next item and VO announces you are in another list that contains two items.
- Continue to navigate to each item using Control-Option-Right Arrow and VO announces similar information for each item and advises when you reach the end of th nested list and the parent list.
- Safari version 13.0.2
- Carbon React version 7.7.1
- Control-Option-Right Arrow to read the first list item. VO announces that there are three items in the list, then reads the item number, position, and text. (Note: Safari displays the first list item as 0)
- Control-Option-Right Arrow to read the next item and VO announces you are in another list that contains two items.
- Continue to navigate to each item using Control-Option-Right Arrow and VO announces similar information for each item and advises when you reach the end of th nested list and the parent list.
Windows screen reader tests
- Firefox version 67
- JAWS 19.1810.64
- Carbon React version 7.7.1
- Navigate the list with Up and Down Arrow keys.
- JAWS announces, "The beginning of the list, number of items in the list, nesting level, content of the list item, and end of list".
- Information and the list item content are announced on two separate lines on the virtual viewer. For example, "List of 2 items nesting level 1. a. Ordered list level 2".
- Bullets and item numbers are also placed on a separate line.
- Chrome version 71.0.3578.98 (Official Build) (64-bit)
- JAWS version 19.1810.64
- Carbon React version 7.7.1
- Navigate the list with Up and Down Arrow keys.
- JAWS announces, "The beginning of the list, number of items in the list, nesting level, content of the list item, and end of list".
- Information and the list item content are announced on two separate lines on the virtual viewer. For example, "List of 2 items nesting level 1. a. Ordered list level 2".
- Bullets and item numbers are also placed on a separate line.
- Chrome version 71.0.3578.98 (Official Build) (64-bit)
- NVDA version 2018.4.1
- Carbon React version 7.7.1
- Navigate the list with Up and Down Arrow keys.
- NVDA announces, "The beginning of the list, number of items in the list, nesting level, content of the list item, and end of list".
- List item parameters are announced together with the list item content. For example, "List with 3 items. 1. Ordered list. Level 1".
Android screen reader tests
- Chrome version 71.0.3578.98 (Official Build) (64-bit)
- Carbon React version 7.7.1
- Navigate list items by swiping left or right, or using the Left and Right Arrow keys.
- Talkback announces, "In list" when entering a list. "Out of list" when exiting a list.
- Talkback also announces entering or exiting nested lists. Number of list items, nesting levels, and content of the list item.
- Bullets and numbers are announced separately from the list item content.
iOS screen reader tests
- Safari version 13.1.3
- Carbon React version 7.7.1
- Navigate list items by swiping left or right, or using the Left and Right Arrow keys on the keyboard when the quick navigation is turned on.
- iOS announces, "The start of the list, nesting level, the content of the list item and the end of the list".
- When navigating the list, "list start" is announced on the beginning of the list, and "list end" is announced at the end of the list, regardless of the direction we are approaching from.
- Information about the list, bullets and numbers and list item contents are pronounced separately, we have to navigate through these one by one.