-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Tiptap RTE: A11Y label improvements #19531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances accessibility by adding label
attributes to inputs, buttons, and selects across the Tiptap RTE toolbar, statusbar, menu components, and the overlay-size editor.
- Adds
label
to the filter input and toolbar buttons in the toolbar configuration. - Mirrors these changes in the statusbar configuration.
- Updates the toolbar menu and button elements to bind labels directly.
- Introduces a
label
on the overlay-size select component.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/.../tiptap/property-editors/.../toolbar-configuration.element.ts | Added label attributes to filter input and toolbar item buttons. |
src/.../tiptap/property-editors/.../statusbar-configuration.element.ts | Added label attributes to filter input and statusbar item buttons. |
src/.../tiptap/components/toolbar/tiptap-toolbar-menu.element.ts | Removed ifDefined and bound label directly on menu buttons. |
src/.../tiptap/components/toolbar/tiptap-toolbar-button.element.ts | Removed ifDefined and replaced with a direct label binding. |
src/.../overlay-size/property-editor-ui-overlay-size.element.ts | Added a label to the overlay-size <uui-select> . |
Comments suppressed due to low confidence (2)
src/Umbraco.Web.UI.Client/src/packages/tiptap/components/toolbar/tiptap-toolbar-menu.element.ts:7
- Removing
ifDefined
may cause thelabel
attribute to render as "undefined" when its value is missing. Consider usingifDefined(label)
or providing a default string to avoid invalid attribute values.
import { css, customElement, html, state, when } from '@umbraco-cms/backoffice/external/lit';
src/Umbraco.Web.UI.Client/src/packages/tiptap/components/toolbar/tiptap-toolbar-button.element.ts:46
- The variable
label
is not defined here after replacingifDefined
. You should either declareconst label = this.manifest?.meta.label
or revert to usingthis.manifest?.meta.label
wrapped withifDefined
to prevent a ReferenceError.
label=${label}
Description
Adds labels to various actions, buttons and menus in the Tiptap RTE and associated property-editors (for toolbar, statusbar, etc).