Version: Unity 6.3 Beta (6000.3)
LanguageEnglish
  • C#

AccessibilityRole.TabButton

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

The accessibility node behaves like an item in an ordered list of tabs.


Platform-specific behavior

- Android: If this role is set on a node, the screen reader announces the node as a "button". After a short pause, it provides instructions on how to activate the node. - iOS: If this role is set on a node and the node's parent has AccessibilityRole.TabBar set, the screen reader announces the node as a "tab". Otherwise, it announces the node as a "button". - macOS: If this role is set on a node, the screen reader announces the node as a "tab". After a short pause, it provides instructions on how to select the node. If the node's parent has AccessibilityRole.TabBar set, the screen reader also announces the tab's position in the tab bar and the total number of tabs in it. - Windows: If this role is set on a node, the screen reader announces the node as a "tab item".

For proper functionality, the parent node of tab button nodes must have AccessibilityRole.TabBar assigned.

If the tab represented by the tab button node is selected, assign AccessibilityState.Selected to the node to inform the screen reader of which tab is currently selected.

Subscribe to the AccessibilityNode.invoked event to inform the screen reader that the node can be activated, and perform an appropriate action when the user activates it, such as selecting the tab represented by the node.