
components
Button
v.1.0.0 | SaturnAccessibility
Accessibility is a crucial consideration when designing and developing components, as it ensures that all users, regardless of their abilities or limitations, can interact effectively with your project. In this section, we will explore how our button has been developed with accessibility in mind, ensuring that all users have a smooth and meaningful experience.
The following mencioned props and recommendations are optional, althougt at Kubit strongly recommend their use to meet accessibility standars.
Text
Use especific text labels:
When possible, button labels/text should describe actions as accurately as possible avoiding general words. If it is not possible to use a specific label, a label text is repeated along the interface or more information is needed for screen reader users, an accessible label has to be added.
Screen reader and keyboard users experience
If button use a correct semantic markup though the alt and aria specific props:
- Screen reader and keyboard users would be able to interact with them
- Screen readers could know that a button is a button and other information such as if it is disabled.
- Screen reader user could use the shortcuts to access directly to them.
Keyboard interaction
button should be operable through a keyboard or a keyboard interface.
Icon
If the button contains an icon
If the icon is decorative, this information should be hidden to the screen reader users so they don't have to lister the information twice.
If the button is an image (for example an icon)
It needs a text description that will be the accessible label for screen reader users, and when possible will we include a visible text label to facilitate the interaction for people that uses speech recognition softwares.
The accessible label has to include buttons functionality so screen reader users could receive an equivalent information.
Loading
When the button has a loading state, screen reader users have to be notified about this interaction.
Use aria-label to announce information. This is specially important if the process takes time and the screen reader user can't interact. With this information they can know that something is happening.
Visual design
Color contrast
For text labels in buttons needs a color contrast of at least 4'5:1 for regular text and 3:1 for large scale or bold text.
For the rest of elements at least of 3:1 color contrast ratio is needed.
Size
The area for clicking and tapping buttons must be large enough. The recommended size of the target for pointer inputs is at least 24x24px and 44x44px for best readability.