Skip to content

Add support for Tooltip API and Navigation Button API #128

@swashbuck

Description

@swashbuck

Subject of the issue
The devtools nav button has no configurable label, aria-label, or tooltip. Other extensions (e.g. Page Level Progress, Home Button) support these via _globals in course.json, giving authors control over accessibility text and optional visible labels.

Your environment

  • Framework: >=5.46.4
  • Browser and version: All
  • Device(s) and OS: All

Actual behaviour
The devtools nav button renders with no aria-label, no visible label, and no tooltip. The button is also added to the nav via direct DOM manipulation rather than the framework navigation.addButton() API.

Expected behaviour
The devtools nav button should support the same label and tooltip pattern as other nav extensions:

  • Configurable ariaLabel for screen readers
  • Optional visible nav label (navLabel, toggled by _showLabel)
  • Optional hover tooltip (_navTooltip._isEnabled, _navTooltip.text)
  • Nav order control (_navOrder)

All configured via _globals._extensions._devtools in course.json.

Implementation notes

  • Replace the legacy DevtoolsNavigationView extends Backbone.View (Handlebars template) with a NavigationButtonView-based view
  • Use NavigationButtonModel and navigation.addButton()
  • Register tooltip via core/js/tooltips
  • Add schema/course.schema.json for globals
  • Update properties.schema and example.json
  • Reference pattern: adapt-homeButton (HomeNavigationButtonView)

Posted via collaboration with Claude Code

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions