Popover: support content reading on opening#34311
Draft
EugeniyKiyashko wants to merge 1 commit into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves accessibility behavior for Popover-family overlays by ensuring assistive technologies can consistently read popover content via aria-describedby when appropriate, while keeping role/aria-labelledby behavior correct across different interaction modes (tooltip-like vs dialog-like).
Changes:
- Add Popover-side syncing of overlay content
idand targetaria-describedby, including cleanup on option changes and dispose. - Refine
role/aria-labelledbybehavior for Popover/Tooltip/Popup (e.g., dialog-mode vs tooltip-mode, and titleTemplate edge cases). - Extend unit (QUnit) and e2e a11y coverage for the new role/label/description behaviors across Popover, Tooltip, Popup, ActionSheet, and Lookup.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/devextreme/testing/tests/DevExpress.ui.widgets/tooltip.tests.js | Adds a11y regression tests for Tooltip role behavior with title/close button and toolbar items. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets/popup.tests.js | Adds tests ensuring aria-labelledby isn’t set when the title label element is missing due to a custom titleTemplate. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets/popover.tests.js | Adds comprehensive tests for target aria-describedby wiring, stability, cleanup, and role/label interactions. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets/actionSheet.tests.js | Verifies ActionSheet popover mode does not add aria-describedby to its target. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/lookup.tests.js | Ensures Lookup popover mode stays dialog-role and does not describe the input element. |
| packages/devextreme/js/__internal/ui/tooltip.ts | Adjusts Tooltip to preserve legacy role rules and avoid Popover aria-describedby syncing (but needs a fix to keep role syncing). |
| packages/devextreme/js/__internal/ui/popup/popup.ts | Prevents dangling aria-labelledby when a custom titleTemplate doesn’t render a label element; resync on titleTemplate changes. |
| packages/devextreme/js/__internal/ui/popover/popover.ts | Implements aria role computation/sync, stable overlay content id generation, and target aria-describedby sync/cleanup. |
| packages/devextreme/js/__internal/ui/lookup.ts | Switches Lookup popover role forcing to internal _overlayContentRole instead of direct DOM mutation. |
| packages/devextreme/js/__internal/ui/action_sheet.ts | Switches ActionSheet popover role forcing to internal _overlayContentRole instead of direct DOM mutation. |
| packages/devextreme/js/__internal/scheduler/header/calendar.ts | Disables target description (_describeTarget: false) for an interactive calendar overlay to avoid noisy descriptions. |
| e2e/testcafe-devextreme/tests/accessibility/popover.ts | Updates option matrix and a11y configuration/selector to cover new behaviors for visible and hidden popovers. |
Comment on lines
+48
to
+50
| // NOTE: Tooltip manages the target relationship itself (_toggleAriaAttributes), | ||
| // so the inherited Popover sync must stay disabled to avoid a second describedby id. | ||
| _syncAriaAttributes(): void {} |
Comment on lines
+408
to
+412
| } else if (previousElements.has(element)) { | ||
| // NOTE: A pre-existing token this instance did not add is foreign, | ||
| // so it is never claimed and cleanup cannot strip a manual description. | ||
| describedElements.push(element); | ||
| } |
Comment on lines
+21
to
+25
| // NOTE: dialog-mode popovers (toolbarItems or showTitle + showCloseButton) have no | ||
| // accessible name unless a title is set. Providing a default dialog name is a separate | ||
| // dialog-labeling task (see dialog-labeling-known-issue.md), so the best-practice rule | ||
| // is disabled for the combinations where the name is intentionally absent. | ||
| // Re-enable this rule once that task lands. |
EugeniyKiyashko
force-pushed
the
feature/26_2_popover_support_content_reading
branch
from
July 15, 2026 12:44
869b7fe to
5ccace2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.