Proposed labels: accessibility, area:frontend, good first issue
Context
The reusable datepicker-input directive creates a readonly text input, but
callers cannot reliably supply an input ID or connect a visible label and
description. Its popup state is also not communicated to assistive technology.
Suggested starting points
public/scripts/app/datepicker-input.directive.js
- templates that render
<datepicker-input>, including post-editor views
- the bundled datepicker's show/hide lifecycle already handled by the
directive
Scope
Add optional directive attributes for an input ID and label/description wiring.
Expose the datepicker's expanded state and popup relationship using suitable
ARIA attributes, keeping the existing Angular model and date format behavior.
Non-goals
- Do not replace or upgrade the datepicker library.
- Do not change date serialization, min/max-date semantics, or default popup
placement.
Acceptance criteria
- A caller can give the generated input a stable ID and associate it with a
label and optional description.
- The input communicates that it opens a date dialog/popup and whether it is
expanded.
- Opening, selecting a date, pressing Escape, and hiding the picker leave the
ARIA state accurate.
- Existing
ngModel, min/max dates, and on-change behavior remain intact.
Verification
- Run
npm test.
- Exercise an existing post-editor date picker with a keyboard: focus, open,
select a date, press Escape, and confirm the value and popup state update.
- Inspect the rendered input in browser developer tools to confirm label and
ARIA relationships are present when attributes are supplied.
Proposed labels:
accessibility,area:frontend,good first issueContext
The reusable
datepicker-inputdirective creates a readonly text input, butcallers cannot reliably supply an input ID or connect a visible label and
description. Its popup state is also not communicated to assistive technology.
Suggested starting points
public/scripts/app/datepicker-input.directive.js<datepicker-input>, including post-editor viewsdirective
Scope
Add optional directive attributes for an input ID and label/description wiring.
Expose the datepicker's expanded state and popup relationship using suitable
ARIA attributes, keeping the existing Angular model and date format behavior.
Non-goals
placement.
Acceptance criteria
label and optional description.
expanded.
ARIA state accurate.
ngModel, min/max dates, andon-changebehavior remain intact.Verification
npm test.select a date, press Escape, and confirm the value and popup state update.
ARIA relationships are present when attributes are supplied.