AccNameShouldNotContainRole
Text
Element's Name ({0}) should not contain the text of the Element's Role ({1})
Type
Warning
Description
The name of an element incorporates its MSAA role or UIA control type. For example, this warning can occur if the get_accName method—which is used to retrieve the MSAA name of an element—returns "ROLE_SYSTEM_SCROLLBAR_*".
This issue causes problems for people who rely on a screen-reader and keyboard for navigation because the role will be read twice, or it may be unpronounceable or non-intuitive for users.
Possible causes
- The element or its parent has an incorrectly assigned name or label.
- The element or its parent has a default name that has not been revised to a friendly name. For example, button1.
- A developer is not aware that screen readers read names.
Related topics
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for