Semantic Input Button Name
Serious - WCAG Level AA
The accessibility issue arises when form submission and reset buttons lack descriptive text that clearly indicates their purpose. For example, a button labeled simply as "Submit" or "Reset" may not provide sufficient context, especially for users relying on assistive technologies like screen readers. These users may struggle to understand the action that will be performed when they activate the button, leading to confusion and potential errors in form submission.
For users with disabilities, particularly those using screen readers or keyboard navigation, clear labeling of buttons is crucial. Screen readers announce the name of the button, and if the name is vague or generic, users may not know what action will take place. This can lead to frustration and hinder the overall user experience, making it challenging to complete tasks effectively.
How to Fix It
Use Descriptive Text: Ensure that the button's text clearly describes its action. Instead of generic labels, use specific phrases like "Submit Application" or "Reset Password".
Utilize ARIA Attributes: If necessary, you can enhance the button’s accessibility further with ARIA attributes. For instance,
aria-labelcan be used to provide additional context if the visible text is not sufficient.Maintain Consistency: Use consistent terminology across your application to help users predict the actions of buttons.
Best Practices:
Avoid Generic Labels: Always opt for specific action-oriented labels. For example, instead of just "Submit", use "Send Message" or "Place Order".
Test with Screen Readers: Regularly test your forms with screen readers to ensure that the button labels convey the intended actions clearly.
Common Mistakes:
Using Icons Alone: Relying solely on icons without accompanying text can be problematic. Always include text labels alongside icons to ensure clarity.
Overly Long Labels: While specificity is important, overly verbose labels can also be confusing. Aim for a balance between clarity and conciseness.