diff --git a/blazor/ribbon/accessibility.md b/blazor/ribbon/accessibility.md index b9d26ac710..5455973e57 100644 --- a/blazor/ribbon/accessibility.md +++ b/blazor/ribbon/accessibility.md @@ -9,7 +9,7 @@ documentation: ug # Accessibility in Blazor Ribbon component -The Ribbon component followed the accessibility guidelines and standards, including [ADA](https://www.ada.gov/), [Section 508](https://www.section508.gov/), [WCAG 2.2](https://www.w3.org/TR/WCAG22/) standards, and [WCAG roles](https://www.w3.org/TR/wai-aria/#roles) that are commonly used to evaluate accessibility. +The Ribbon component is designed to follow accessibility guidelines and standards, including [ADA](https://www.ada.gov/), [Section 508](https://www.section508.gov/), [WCAG 2.2](https://www.w3.org/TR/WCAG22/), and [WCAG roles](https://www.w3.org/TR/wai-aria/#roles) roles. The accessibility compliance for the Ribbon component is outlined below. @@ -39,80 +39,77 @@ The accessibility compliance for the Ribbon component is outlined below. ## WAI-ARIA attributes -The Ribbon component followed the [WAI-ARIA](https://www.w3.org/WAI/ARIA/apg/patterns/tabs/) patterns to meet the accessibility. The following ARIA attributes are used in the Ribbon component: +The Ribbon component uses [WAI-ARIA](https://www.w3.org/WAI/ARIA/apg/patterns/tabs/) patterns to enhance accessibility. The following ARIA attributes are used in the component: -| Attributes | Purpose | +| Attribute | Purpose | | --- | --- | -| `role=tablist` | Used to identify the element that serves as the container for a set of tabs. | -| `role=tab` | Indicates an interactive element within a tablist that, when activated, displays its associated tab panel.| -| `role=tabpanel` | Specifies the role for the content associated with an active tab, describing its role in presenting the active content.| -| `role=button` | Represents a clickable element that trigger a response when activated by the user.| -| `role=menu` | Represents an item that have sub menu.| -| `role=menuitem` | Indicates an option in a set of choices within a menu. | -| `role=combobox` | Identifies an element as an input that controls another element, commonly used for dropdowns. | -| `role=option` | Used for selectable items in a combobox. | -| `role=gridcell` | Specified as gridcell for the tiles in the color palette. | -| `aria-orientation` | Indicates the element's orientation as horizontal, vertical, or unknown/ambiguous. | -| `aria-selected` | Indicates the current `selected` state of various widgets. | -| `aria-labelledby` | Sets to the Tab content element to indicates the associated Tab header for the content. | -| `aria-controls` | Indicates the associated tabpanel for the header by setting the attribute on Tab items. | -| `aria-haspopup` | Indicates availability and type of interactive popup triggered by the element it's set on. | -| `aria-disabled` | Indicates that the element is perceivable but disabled, making it not editable or operable. | -| `aria-expanded` | Indicates whether a component is expanded or collapsed, set on the respective element. | -| `aria-label` | Defines a string value that labels an interactive element for accessibility. | -| `aria-checked` | Indicates the current `checked` state of checkboxes, radio buttons, and other widgets. | -| `aria-owns` | Identifies an element or elements, establishing a relationship when DOM hierarchy can't represent it. | -| `aria-readonly` | Indicates that the element is not editable but is otherwise operable. | -| `aria-activedescendent` | Identifies the currently active element when focus is on a combobox, textbox, group, or application. | -| `aria-autocomplete` | Indicates whether inputting text could trigger display of predictions and specifies how predictions will be presented for a combobox, searchbox, or textbox. | +| `role=tablist` | Identifies the container element for a set of tabs. | +| `role=tab` | Identifies an interactive element inside a `tablist` that controls the visibility of an associated `tabpanel`. | +| `role=tabpanel` | Identifies the container for the content associated with a `tab`. | +| `role=button` | Identifies a clickable element that triggers a response when activated. | +| `role=menu` | Identifies a container for a set of `menuitem` elements. | +| `role=menuitem` | Identifies a selectable option within a `menu`. | +| `role=combobox` | Identifies an input element that controls a separate popup element, such as a listbox or grid. | +| `role=option` | Identifies a selectable item within a listbox or combobox. | +| `role=gridcell` | Identifies a cell within a `grid` or `treegrid`. | +| `aria-orientation` | Indicates the orientation of an element, such as a `tablist` or `toolbar`. | +| `aria-selected` | Indicates the current selection state of an element within a set, such as a `tab` or `option`. | +| `aria-labelledby` | Associates an element with the element that provides its label. | +| `aria-controls` | Identifies the element whose content is controlled by the current element. | +| `aria-haspopup` | Indicates that the element can trigger a popup and specifies the type of popup. | +| `aria-disabled` | Indicates that the element is visible but not interactive. | +| `aria-expanded` | Indicates whether a collapsible element is currently expanded or collapsed. | +| `aria-label` | Provides an accessible name for an interactive element. | +| `aria-checked` | Indicates the state of a checkable element like a checkbox or menuitemcheckbox. | +| `aria-owns` | Establishes a relationship between elements when the DOM hierarchy cannot represent it. | +| `aria-readonly` | Indicates that an element is not editable but is otherwise interactive. | +| `aria-activedescendant` | Identifies the currently focused descendant of a composite widget. | +| `aria-autocomplete` | Indicates how predictions are presented for a combobox, searchbox, or textbox. | ## Keyboard interaction -The Ribbon component followed the [keyboard interaction](https://www.w3.org/WAI/ARIA/apg/patterns/tabs/#keyboardinteraction) guideline, making it easy for people who use assistive technologies (AT) and those who completely rely on keyboard navigation. The following keyboard shortcuts are supported by the Ribbon component. +The Ribbon component follows the [keyboard interaction](https://www.w3.org/WAI/ARIA/apg/patterns/tabs/#keyboardinteraction) to support users who rely on assistive technologies (AT) or keyboard navigation. The following keyboard shortcuts are available: -| Windows | Mac | Actions | +| Windows | Mac | Action | | --- | --- | --- | -| Ribbon Tab | | | -| Tab | Tab | To focus the ribbon tabs. | -| | | Moves focus to the next Tab. | -| | | Moves focus to the previous Tab. | -| Enter or Space | Enter or Space | To select the currently focused ribbon tab. | -| Ribbon Items| | | -| Tab | Tab | To focus the ribbon Items. | -| | | Focuses the next item. | -| | | Focuses the previous item. | -| Enter or Space | Enter or Space | To select the currently focused ribbon item. | -| Ribbon Dropdown Items/ Ribbon Split button|| -| Esc | Esc | Closes the popup. | -| Enter or Space | Enter or Space | Opens the popup, or activates the highlighted item and closes the popup. | -| | | Focuses the next item. | -| | | Focuses the previous item. | -| Alt + | + | Closes the popup.| -| Alt + | + | Opens the popup | -| Ribbon File menu| | | -| Tab | Tab | To focus the ribbon file menu. | -| Esc | Esc | Closes the popup. | -| Enter | Enter | Opens the popup, or activates the highlighted item and closes the popup. | -| | | Focuses the previous action item. | -| | | Focuses the next action item. | -| Alt + | + | Opens the popup | -| Ribbon Combobox | | | -| | | Selects the first item in the ComboBox when no item selected. Otherwise, selects the item next to the currently selected item. | -| | | Selects the item previous to the currently selected one. | -| Page Down | Page Down | Scrolls down to the next page and selects the first item when popup list opens. | -| Page Up | Page Up | Scrolls up to the previous page and selects the first item when popup list opens. | -| Enter | Enter | Selects the focused item and popup list closes when it is in open state. | -| Tab | Tab | Focuses on the next TabIndex element on the page when the popup is closed. Otherwise, closes the popup list and remains the focus of the component. | -| Shift + Tab | + Tab | Focuses on the previous TabIndex element on the page when the popup is closed. Otherwise, closes the popup list and remains the focus of the component. | -| Alt + | + | Open the popup list | -| Alt + | + | Close the popup list | -| Esc(Escape) | Esc | Closes the popup list when it is in an open state and the currently selected item remains the same. | -| Home | Home | Cursor moves to before of first character in input | -| End | End | Cursor moves to next of last character in input | +| **Ribbon Tab** | | | +| Tab | Tab | Focuses the first Ribbon tab. If a tab is already focused, it moves focus out of the tab list. | +| | | Moves focus to the next tab. | +| | | Moves focus to the previous tab. | +| Enter or Space | Enter or Space | Selects the currently focused tab. | +| **Ribbon Items** | | | +| Tab | Tab | Navigates between items within a Ribbon group. | +| | | Moves focus to the next item. | +| | | Moves focus to the previous item. | +| Enter or Space | Enter or Space | Activates the focused item. | +| **Ribbon Dropdown/Split Button** | | | +| Enter or Space | Enter or Space | Opens the dropdown or activates the selected item. | +| / | / | Moves focus between items in the dropdown list. | +| Alt + | + | Opens the dropdown. | +| Alt + | + | Closes the dropdown. | +| Esc | Esc | Closes the dropdown. | +| **Ribbon File Menu** | | | +| Enter | Enter | Opens the file menu or activates the selected item. | +| / | / | Moves focus between items in the file menu. | +| Alt + | + | Opens the file menu. | +| Esc | Esc | Closes the file menu. | +| **Ribbon ComboBox** | | | +| | | Selects the first item if none is selected, otherwise selects the next item. | +| | | Selects the previous item. | +| Page Down | Page Down | Scrolls to the next page of items. | +| Page Up | Page Up | Scrolls to the previous page of items. | +| Enter | Enter | Selects the focused item and closes the suggestion list. | +| Tab | Tab | Focuses the next element on the page. If the suggestion list is open, it closes it first. | +| Shift + Tab | + Tab | Focuses the previous element on the page. If the suggestion list is open, it closes it first. | +| Alt + | + | Opens the suggestion list. | +| Alt + | + | Closes the suggestion list. | +| Esc | Esc | Closes the suggestion list, retaining the current selection. | +| Home | Home | Moves the cursor to the beginning of the input text. | +| End | End | Moves the cursor to the end of the input text. | ## Ensuring accessibility -The Ribbon component's accessibility levels are ensured through an [accessibility-checker](https://www.npmjs.com/package/accessibility-checker) and [axe-core](https://www.npmjs.com/package/axe-core) software tools during automated testing. +The Ribbon component's accessibility is ensured through automated testing using [accessibility-checker](https://www.npmjs.com/package/accessibility-checker) and [axe-core](https://www.npmjs.com/package/axe-core) software tools. These tools help maintain a high level of compliance by automatically detecting potential issues. ## See also diff --git a/blazor/ribbon/backstage.md b/blazor/ribbon/backstage.md index f005c830ad..19aa09d1a2 100644 --- a/blazor/ribbon/backstage.md +++ b/blazor/ribbon/backstage.md @@ -9,17 +9,17 @@ documentation: ug # Backstage in Blazor Ribbon component -The Ribbon component supports a backstage view as an enhancement to the traditional file menu. Backstage view can be used to display options like application settings, user details, and more. It can be configured using the [RibbonBackstageMenuSettings](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.RibbonBackstageMenuSettings.html) tag directive. +The Ribbon component supports a backstage view as an enhancement to the traditional file menu. The backstage view displays options such as application settings, user details, and more. It is configured using the [RibbonBackstageMenuSettings](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.RibbonBackstageMenuSettings.html) tag directive. -Backstage menu options are displayed on the left panel, and the corresponding content is shown on the right panel. +Backstage menu options appear on the left panel, and the corresponding content is shown on the right panel. ## Visibility -You can make the backstage view visible by setting the [Visible](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.RibbonBackstageMenuSettings.html#Syncfusion_Blazor_Ribbon_RibbonBackstageMenuSettings_Visible) property of the [RibbonBackstageMenuSettings](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.RibbonBackstageMenuSettings.html) tag directive to `true`. By default, the backstage view is hidden. +Set the [Visible](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.RibbonBackstageMenuSettings.html#Syncfusion_Blazor_Ribbon_RibbonBackstageMenuSettings_Visible) property of the [RibbonBackstageMenuSettings](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.RibbonBackstageMenuSettings.html) tag directive to `true` to show the backstage view. By default, the backstage view is hidden. ## Adding backstage items -You can add menu items to the backstage view using the [BackstageMenuItems](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.BackstageMenuItems.html) tag directive. Each menu item can be defined with properties such as [ID](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.BackstageMenuItem.html#Syncfusion_Blazor_Ribbon_BackstageMenuItem_ID), [Text](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.BackstageMenuItem.html#Syncfusion_Blazor_Ribbon_BackstageMenuItem_Text), [IconCss](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.BackstageMenuItem.html#Syncfusion_Blazor_Ribbon_BackstageMenuItem_IconCss), and content templates. +Add menu items to the backstage view using the [BackstageMenuItems](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.BackstageMenuItems.html) tag directive. Each menu item can define properties such as [ID](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.BackstageMenuItem.html#Syncfusion_Blazor_Ribbon_BackstageMenuItem_ID), [Text](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.BackstageMenuItem.html#Syncfusion_Blazor_Ribbon_BackstageMenuItem_Text), [IconCss](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.BackstageMenuItem.html#Syncfusion_Blazor_Ribbon_BackstageMenuItem_IconCss), and content templates. {% tabs %} {% highlight razor %} @@ -209,7 +209,7 @@ RenderFragment RenderWrapperContent(string icon, string name, string description ## Adding footer items -You can add the footer items in the backstage view by setting the [IsFooter](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.BackstageMenuItem.html#Syncfusion_Blazor_Ribbon_BackstageMenuItem_IsFooter) property in the [BackstageMenuItem](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.BackstageMenuItem.html) tag directive to `true`. These items are displayed at the bottom of the menu. By default, the value is `false`. +Add footer items to the backstage view by setting the [IsFooter](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.BackstageMenuItem.html#Syncfusion_Blazor_Ribbon_BackstageMenuItem_IsFooter) property in the [BackstageMenuItem](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.BackstageMenuItem.html) tag directive to `true`. Footer items are displayed at the bottom of the menu. By default, the value is `false`. {% tabs %} {% highlight razor %} @@ -413,7 +413,7 @@ RenderFragment RenderWrapperContent(string icon, string name, string description ## Adding separator -The separators are horizontal lines used to visually divide backstage menu items. You can use the [Separator](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.BackstageMenuItem.html#Syncfusion_Blazor_Ribbon_BackstageMenuItem_Separator) property to split the menu items. +Separators are horizontal lines used to visually divide backstage menu items. Use the [Separator](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.BackstageMenuItem.html#Syncfusion_Blazor_Ribbon_BackstageMenuItem_Separator) property to separate menu items. {% tabs %} {% highlight razor %} @@ -618,7 +618,7 @@ RenderFragment RenderWrapperContent(string icon, string name, string description ## Back button -You can use the [BackButtonSettings](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.RibbonBackstageMenuSettings.html#Syncfusion_Blazor_Ribbon_RibbonBackstageMenuSettings_BackButtonSettings) property in the [RibbonBackstageMenuSettings](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.RibbonBackstageMenuSettings.html) tag directive to customize the text and icon of the close button using the [Text](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.BackstageBackButtonSettings.html#Syncfusion_Blazor_Ribbon_BackstageBackButtonSettings_Text) and [IconCss](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.BackstageBackButtonSettings.html#Syncfusion_Blazor_Ribbon_BackstageBackButtonSettings_IconCss) property. You can show the back button by setting the [Visible](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.BackstageBackButtonSettings.html#Syncfusion_Blazor_Ribbon_BackstageBackButtonSettings_Visible) property to `true`. +Use the [BackButtonSettings](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.RibbonBackstageMenuSettings.html#Syncfusion_Blazor_Ribbon_RibbonBackstageMenuSettings_BackButtonSettings) property in the [RibbonBackstageMenuSettings](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.RibbonBackstageMenuSettings.html) tag directive to customize the text and icon of the back button using the [Text](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.BackstageBackButtonSettings.html#Syncfusion_Blazor_Ribbon_BackstageBackButtonSettings_Text) and [IconCss](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.BackstageBackButtonSettings.html#Syncfusion_Blazor_Ribbon_BackstageBackButtonSettings_IconCss) properties. Show the back button by setting the [Visible](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.BackstageBackButtonSettings.html#Syncfusion_Blazor_Ribbon_BackstageBackButtonSettings_Visible) property to `true`. {% tabs %} {% highlight razor %} @@ -761,11 +761,11 @@ You can use the [BackButtonSettings](https://help.syncfusion.com/cr/blazor/Syncf {% endhighlight %} {% endtabs %} -![Ribbon Backstage Backbutton](./images/backstage/backstage_backbutton.png) +![Ribbon Backstage Back button](./images/backstage/backstage_backbutton.png) ## Template -You can customize the backstage menu items and their content using the [Template](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.RibbonBackstageMenuSettings.html#Syncfusion_Blazor_Ribbon_RibbonBackstageMenuSettings_Template) property in the [RibbonBackstageMenuSettings](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.RibbonBackstageMenuSettings.html) tag directive. +Customize backstage menu items and their content using the [Template](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.RibbonBackstageMenuSettings.html#Syncfusion_Blazor_Ribbon_RibbonBackstageMenuSettings_Template) property in the [RibbonBackstageMenuSettings](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.RibbonBackstageMenuSettings.html) tag directive. {% tabs %} {% highlight razor %} @@ -1000,11 +1000,11 @@ You can customize the backstage menu items and their content using the [Template ## Setting width and height -The height and width of the backstage view can be customized using the [Height](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.RibbonBackstageMenuSettings.html#Syncfusion_Blazor_Ribbon_RibbonBackstageMenuSettings_Height) and [Width](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.RibbonBackstageMenuSettings.html#Syncfusion_Blazor_Ribbon_RibbonBackstageMenuSettings_Width) properties. By default, the dimensions are adjusted to fit the content. +Customize the height and width of the backstage view using the [Height](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.RibbonBackstageMenuSettings.html#Syncfusion_Blazor_Ribbon_RibbonBackstageMenuSettings_Height) and [Width](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ribbon.RibbonBackstageMenuSettings.html#Syncfusion_Blazor_Ribbon_RibbonBackstageMenuSettings_Width) properties. By default, the dimensions adjust to fit the content. ## Events -The following event is available in the Ribbon Backstage. +The following event is available in the backstage view. |Name|Args|Description| |---|---|---| diff --git a/blazor/ribbon/contextual-tabs.md b/blazor/ribbon/contextual-tabs.md index 6068ea100c..6cb24590d9 100644 --- a/blazor/ribbon/contextual-tabs.md +++ b/blazor/ribbon/contextual-tabs.md @@ -9,15 +9,17 @@ documentation: ug # Contextual tabs in Blazor Ribbon component -The Ribbon Contextual tabs are similar to the Ribbon tabs that are displayed on demand based on their needs, such as an image or a table tabs. It supports adding all built-in and custom Ribbon items to perform specific actions. +Contextual tabs in the Blazor Ribbon are dynamic tabs that appear only when needed, based on the user's context—such as selecting a specific element like an image, table, or chart. Once displayed, they provide a set of relevant tools and commands. These tabs support all built-in and custom Ribbon items. ## Controlling tab visibility You can utilize the `Visible` property to control the visibility of each contextual tab. By default the value is `false`. -## Adding contextual tabs +## Adding Contextual Tabs -You can utilize the `RibbonContextualTabs` tag directive to define contextual tabs within the Ribbon. This allows you to group collection of Ribbon tabs and display them only when required. +Define contextual tabs within the `` tag directive. Inside, each `` group can contain a collection of one or more `RibbonTab` components that will be displayed together when the contextual group becomes active. + +The following example demonstrates how to add a "Shape Format" contextual tab, which is initially hidden. {% tabs %} {% highlight razor %} @@ -119,7 +121,7 @@ You can utilize the `RibbonContextualTabs` tag directive to define contextual ta ## Selected tabs -By using the `IsSelected` property you can control the selected state of each contextual tab and indicates which tab is currently active when set to `true`. By default the value is `false`. +Use the `IsSelected` property to specify which `RibbonContextualTab` group is active. When a contextual group is visible, setting `IsSelected` to `true` for a specific tab within that group brings it into focus. By default, its value is `false`. {% tabs %} {% highlight razor %} @@ -192,15 +194,17 @@ By using the `IsSelected` property you can control the selected state of each co ![Ribbon Selected Tabs](./images/contextual-tabs/selected-tabs.png) -## Methods +## Controlling Visibility and Selection + +The visibility and selection state of contextual tabs can be managed both declaratively through markup and programmatically -### Show tab +### Visibility -You can use the `ShowTabAsync` method to programmatically display a specific contextual tab in the Ribbon. +The visibility of a `RibbonContextualTab` can be controlled in two ways: -### Hide tab +* **`ShowTabAsync` and `HideTabAsync` Methods**: To programmatically show or hide a specific tab within any contextual group, use the `ShowTabAsync` and `HideTabAsync` methods. These methods require the `ID` of the target `RibbonTab`. -You can use the `HideTabAsync` method allows you to hide the specific contextual tab in the Ribbon. +The example below demonstrates how to use these methods to control a tab's visibility. {% tabs %} {% highlight razor %}