Skip to content

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

leekelleher
Copy link
Member

Description

Adds labels to various actions, buttons and menus in the Tiptap RTE and associated property-editors (for toolbar, statusbar, etc).

Copy link
Contributor

@Copilot Copilot AI left a 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 the label attribute to render as "undefined" when its value is missing. Consider using ifDefined(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 replacing ifDefined. You should either declare const label = this.manifest?.meta.label or revert to using this.manifest?.meta.label wrapped with ifDefined to prevent a ReferenceError.
label=${label}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant