Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion packages/core/src/components/date/date.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, Element, Event, EventEmitter, Fragment, h, Listen, Method, Prop, State, Watch } from '@stencil/core'

Check warning on line 1 in packages/core/src/components/date/date.tsx

View workflow job for this annotation

GitHub Actions / ๐Ÿ—๏ธ Lint, Test & Build

'Fragment' is defined but never used. Allowed unused vars must match /^_|^h$/u
import { defaultConfig, DsComponentInterface, DsConfigState, DsLanguage, DsRegion, ListenToConfig } from '@global'
import {
debounceEvent,
Expand Down Expand Up @@ -562,7 +562,14 @@
language={this.language}
inputId="input"
>
{this.inline && <div id="inline" ref={el => (this.popupHostEl = el as HTMLDivElement)}></div>}
{this.inline && (
<div
id="inline"
role="group"
aria-label={chooseDateLabel}
ref={el => (this.popupHostEl = el as HTMLDivElement)}
></div>
)}
{!this.inline && (
<>
<input
Expand Down
6 changes: 6 additions & 0 deletions packages/core/src/components/date/test/date.a11y.play.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ test('invalid', async ({ page, a11y }) => {
await a11y('ds-date')
})

test('inline', async ({ page, a11y }) => {
await page.mount(`<ds-date label="Date of birth" inline></ds-date>`)
await page.locator('.air-datepicker-cell.-day-:not(.-other-month-)').first().waitFor({ state: 'visible' })
await a11y('ds-date')
})

test('with picker open', async ({ page, a11y }) => {
await page.mount(`<ds-date label="Date of birth"></ds-date>`)
const date = new DsDate(page.locator('ds-date'))
Expand Down
Loading