Fixed #2896 - Improve TabView implementation for Accessibility

This commit is contained in:
mertsincan 2022-08-29 02:19:59 +01:00
parent 3bdaf4a2b9
commit 639c3a605a
9 changed files with 524 additions and 96 deletions

View file

@ -16,6 +16,65 @@ const TabViewProps = [
type: "boolean",
default: "false",
description: "When enabled displays buttons at each side of the tab headers to scroll the tab list."
},
{
name: "tabindex",
type: "number",
default: "0",
description: "Index of the element in tabbing order."
},
{
name: "selectOnFocus",
type: "boolean",
default: "false",
description: "When enabled, the focused tab is activated."
},
{
name: "previousButtonProps",
type: "any",
default: "null",
description: "Uses to pass all properties of the HTMLButtonElement to the previous button."
},
{
name: "nextButtonProps",
type: "any",
default: "null",
description: "Uses to pass all properties of the HTMLButtonElement to the next button."
}
];
const TabViewEvents = [
{
name: "tab-change",
description: "Callback to invoke when an active tab is changed.",
arguments: [
{
name: "originalEvent",
type: "object",
description: "Original event"
},
{
name: "index",
type: "number",
description: "Index of the selected tab"
}
]
},
{
name: "tab-click",
description: "Callback to invoke when an active tab is clicked.",
arguments: [
{
name: "originalEvent",
type: "object",
description: "Original event"
},
{
name: "index",
type: "number",
description: "Index of the clicked tab"
}
]
}
];
@ -23,6 +82,7 @@ module.exports = {
tabview: {
name: "TabView",
description: "TabView is a container component to group content with tabs.",
props: TabViewProps
props: TabViewProps,
event: TabViewEvents
}
};