Skip to content

Map: OSM provider - Add marker tooltips - #35164

Open
AlisherAmonulloev wants to merge 7 commits into
feature/26_2_osm-provider-for-dxmap/mainfrom
26_2_osm-provider-for-dxmap/marker-tooltips
Open

AlisherAmonulloev wants to merge 7 commits into
feature/26_2_osm-provider-for-dxmap/mainfrom
26_2_osm-provider-for-dxmap/marker-tooltips

Conversation

@AlisherAmonulloev

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The implementation is cohesive and extensively covers interaction, accessibility, positioning, and cleanup behavior.

Pull request overview

Adds accessible marker tooltips to the OpenStreetMap provider using DevExtreme Popovers.

Changes:

  • Implements tooltip rendering, positioning, keyboard handling, focus restoration, and cleanup.
  • Adds tooltip styling and Storybook controls.
  • Adds comprehensive QUnit coverage and updates the OpenLayers mock.
File summaries
File Description
packages/devextreme/testing/tests/DevExpress.ui.widgets/mapParts/osmTests.js Covers tooltip behavior, accessibility, lifecycle, and positioning.
packages/devextreme/testing/helpers/forMap/openLayersMock.js Attaches mock overlay containers to the map target.
packages/devextreme/js/__internal/ui/map/provider.dynamic.osm.ts Passes tooltip options and manages cleanup focus behavior.
packages/devextreme/js/__internal/ui/map/provider.dynamic.osm.openlayers.ts Integrates tooltips with OpenLayers markers.
packages/devextreme/js/__internal/ui/map/provider.dynamic.osm.openlayers.tooltip.ts Implements the marker tooltip component.
packages/devextreme/js/__internal/ui/map/provider.dynamic.osm.openlayers.popover.ts Adds specialized Popover positioning behavior.
packages/devextreme/js/__internal/ui/map/provider.dynamic.osm.engine.ts Extends internal marker contracts for tooltips and cleanup.
packages/devextreme-scss/scss/widgets/base/_map.scss Styles marker Popovers and close controls.
apps/react-storybook/stories/map/OSMMap.stories.tsx Demonstrates configurable OSM marker tooltips.
Review details
  • Files reviewed: 9/9 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@AlisherAmonulloev
AlisherAmonulloev marked this pull request as ready for review September 11, 2026 10:32
@AlisherAmonulloev
AlisherAmonulloev requested a review from a team as a code owner September 11, 2026 10:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Hidden tooltips currently perform layout work per marker on every OpenLayers render frame, creating a scalability concern.

Get a fresh assessment by requesting another Copilot review.

Review details
  • Files reviewed: 8/8 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Interactive tooltip semantics and dynamic focus-state enforcement have unresolved accessibility issues.

Review details

Suppressed comments (2)

Previously missed (2) — in code that hasn't changed since the last review.

packages/devextreme/js/__internal/ui/map/provider.dynamic.osm.openlayers.tooltip.ts:75

  • Focusable tooltip content is explicitly exercised by the new SelectBox and custom-button cases, but this configuration keeps the Popover's effective role as tooltip; Popover only derives dialog from toolbar items or a title-plus-Close configuration. A tooltip role must not contain interactive controls, and its dialog focus behavior is disabled, so keyboard and screen-reader users cannot reliably operate that content. Detect interactive content (including runtime contentTemplate changes) and switch to dialog semantics/focus handling, or disallow interactive marker-tooltip content.
    packages/devextreme/js/__internal/ui/map/provider.dynamic.osm.openlayers.tooltip.ts:116
  • The map's focus policy is only re-applied while the Popover is opening. If an already-visible tooltip on a map with focusStateEnabled: false is changed through the supported Popover options (toolbarItems, or title plus Close), Popover's _syncAriaAttributes() calls _syncFocusOptions() and resets both focus options to true for the dialog role. The open tooltip then bypasses the map setting. Re-apply the map-level gate whenever role-affecting Popover options change, not only before showing.
  • Files reviewed: 8/8 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@AlisherAmonulloev

Copy link
Copy Markdown
Contributor Author

🔵 Needs a closer look

Interactive tooltip semantics and dynamic focus-state enforcement have unresolved accessibility issues.
...

  • Review effort level: Balanced

The built-in marker tooltip is intended for non-interactive text and basic HTML formatting. We therefore keep role="tooltip", aria-describedby, and focus on the marker.
Interactive content is a customization scenario: the application must provide appropriate semantics, an accessible name, and focus management. We do not plan to detect interactive HTML automatically. We will document this distinction and update the custom-content examples accordingly.
This approach is pending team confirmation.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants