Skip to content

docs(site): stale docs from #1589 #1703

Description

@github-actions

Summary

API changes in #1589 (feat(core): add i18n foundation with English locale and UI wiring) may have made the following documentation stale.

Triggering PR

#1589

API Changes

The i18n foundation reshaped the label prop/state across the changed control components (CaptionsButton, CaptionsRadioGroup, CastButton, FullscreenButton, LiveButton, MuteButton, PiPButton, PlayButton, PlaybackRateButton, PlaybackRateRadioGroup, QualityRadioGroup, SeekButton, Slider, TimeSlider, Time, VolumeSlider):

  • label prop type: string | ((state) => string) -> a union of i18n translation keys ('play' | 'pause' | ... | 'mediaErrorFallback') plus string & object plus ((state) => TranslationKeyOrString). The prop now accepts a translation key, not just a literal string or function.
  • label state type: string -> the same translation-key union.
  • New prop formatOptions: TimeFormatOptions on TimeSlider (slider thumb aria-valuetext) and Time.Value (spoken-duration copy).
  • Default label changed: TimeSlider 'Seek' -> ''; VolumeSlider 'Volume' -> '' (the default aria-label is now resolved through the i18n English locale rather than a hardcoded literal).

Note: prop/state tables on reference pages are auto-generated by <ComponentReference> and regenerate from JSON, so the items below are limited to hand-written prose that regeneration does not cover.

Stale Documentation Found

High Confidence

File Line(s) Issue API Change
None found

Medium Confidence

File Line(s) Issue API Change
site/src/content/docs/reference/play-button.mdx 92 "Override with the label prop (accepts a string or function)." -- enumeration is now incomplete; label also accepts i18n translation keys. label prop type widened to include translation keys

Low Confidence

File Line(s) Issue API Change
site/src/content/docs/reference/time-slider.mdx 86 "automatic aria-label of "Seek"." -- the label default is no longer the literal 'Seek' (now '', resolved via the i18n seek key). Rendered aria-label is likely unchanged; verify the prose still matches. TimeSlider label default 'Seek' -> ''
site/src/content/docs/reference/volume-slider.mdx 66 "automatic aria-label of "Volume"." -- label default is no longer the literal 'Volume' (now '', resolved via the i18n volume key). Verify the prose still matches. VolumeSlider label default 'Volume' -> ''

Recommended Actions

  • Update play-button.mdx:92 so the label description reflects that it accepts an i18n translation key, a literal string, or a function returning either (e.g. "accepts a translation key, string, or function").
  • Confirm the "Seek" / "Volume" default aria-label prose in time-slider.mdx:86 and volume-slider.mdx:66 still holds now that the literal default is '' and the value comes from the English locale; reword if it implies a hardcoded default.
  • Consider adding documentation for the new i18n / translation-key capability of the label prop -- no concept or how-to guide currently explains that control labels can be set via translation keys (only concepts/why-videojs.mdx mentions "control localization" in passing).
  • Optionally document the new formatOptions prop on Time.Value and TimeSlider in the accessibility prose of time.mdx / time-slider.mdx (the generated reference tables already cover the prop itself).
  • Out of scope but worth a glance: reference/airplay-button.mdx:98 carries the same "string or a function" phrasing; AirPlayButton was not in this diff, so confirm separately whether its label type also changed.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

Status
No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions