-
-
Notifications
You must be signed in to change notification settings - Fork 339
feat: Improve Time panel keyboard navigation and semantics #987
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,11 +66,20 @@ export type Locale = { | |
| week: string; | ||
| month: string; | ||
| year: string; | ||
| hours: string; | ||
| minutes: string; | ||
| seconds: string; | ||
| milliseconds: string; | ||
| previousMonth: string; | ||
| nextMonth: string; | ||
| monthSelect: string; | ||
| yearSelect: string; | ||
| decadeSelect: string; | ||
| hourSelect: string; | ||
| minuteSelect: string; | ||
| secondSelect: string; | ||
| millisecondSelect: string; | ||
| meridiemSelect: string; | ||
|
Comment on lines
+69
to
+82
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win 不要把新增 locale 字段设为必填。
🤖 Prompt for AI Agents |
||
|
|
||
| previousYear: string; | ||
| nextYear: string; | ||
|
|
@@ -316,13 +325,7 @@ export type SemanticName = 'root' | 'prefix' | 'input' | 'suffix'; | |
| export type PreviewValueType = 'hover'; | ||
|
|
||
| export type PanelSemanticName = | ||
| | 'root' | ||
| | 'header' | ||
| | 'body' | ||
| | 'content' | ||
| | 'item' | ||
| | 'footer' | ||
| | 'container'; | ||
| 'root' | 'header' | 'body' | 'content' | 'item' | 'footer' | 'container'; | ||
|
|
||
| export interface SharedPickerProps<DateType extends object = any> | ||
| extends | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,11 +12,20 @@ const locale: Locale = { | |
| week: 'Седмица', | ||
| month: 'Месец', | ||
| year: 'Година', | ||
| hours: 'Часове', | ||
| minutes: 'Минути', | ||
| seconds: 'Секунди', | ||
| milliseconds: 'Милисекунди', | ||
|
Comment on lines
+15
to
+18
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift 不要把时间项读法压缩成单个静态名词。
🤖 Prompt for AI Agents |
||
| timeSelect: 'Избор на час', | ||
| dateSelect: 'Избор на дата', | ||
| monthSelect: 'Избор на месец', | ||
| yearSelect: 'Избор на година', | ||
| decadeSelect: 'Десетилетие', | ||
| hourSelect: 'Изберете час', | ||
| minuteSelect: 'Изберете минута', | ||
| secondSelect: 'Изберете секунда', | ||
| millisecondSelect: 'Изберете милисекунда', | ||
| meridiemSelect: 'Изберете меридием', | ||
| previousMonth: 'Предишен месец (PageUp)', | ||
| nextMonth: 'Следващ месец (PageDown)', | ||
| previousYear: 'Последна година (Control + left)', | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The container
divhas been givenrole="group"to group the time columns (hours, minutes, seconds, etc.). To make this group accessible and identifiable to screen readers, it should have an accessible name. Addingaria-label={locale?.timeSelect}provides the necessary context for assistive technologies.