Skip to content

feat: Improve Time panel keyboard navigation and semantics#987

Open
Pareder wants to merge 2 commits into
react-component:masterfrom
Pareder:feat/improve-time-panel-keyboard-navigation
Open

feat: Improve Time panel keyboard navigation and semantics#987
Pareder wants to merge 2 commits into
react-component:masterfrom
Pareder:feat/improve-time-panel-keyboard-navigation

Conversation

@Pareder

@Pareder Pareder commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR is a small chunk of a big one #972 focusing on providing correct semantics and making elements keyboard accessible for Time panels.

  • Use correct ARIA attributes for each type of list (hours/minutes/seconds)
  • Extend locale with additional strings and translate them into all languages

Summary by CodeRabbit

  • 新功能

    • 时间选择器新增更完整的本地化文案,覆盖小时、分钟、秒、毫秒及上/下午选择提示,支持更多语言区域。
    • 时间列表与选项补充了可访问性标签,提升屏幕阅读器体验。
  • Bug 修复

    • 修正时间选择相关文本在部分语言中的缺失或不一致问题。
    • 改善时间面板的语义结构,增强辅助技术识别。

@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

@Pareder is attempting to deploy a commit to the afc163's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@Pareder, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 9 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0e34557b-8e24-4360-9633-d81e8d866952

📥 Commits

Reviewing files that changed from the base of the PR and between d566890 and 0c9bb54.

📒 Files selected for processing (1)
  • src/PickerPanel/TimePanel/TimePanelBody/TimeColumn.tsx

概述

为时间面板添加无障碍访问支持:TimePanelBody 容器新增 role="group"TimeColumnul/li 新增 role="listbox/option" 及基于 locale 的 aria-label/aria-selected/aria-disabled 属性。同时扩展 Locale 类型新增 9 个必填时间字段,并在所有语言包中补全对应文案。

变更内容

时间面板无障碍访问与本地化扩展

层级 / 文件 摘要
Locale 类型与 TimeUnitType 合约扩展
src/interface.tsx, src/PickerPanel/TimePanel/TimePanelBody/TimeColumn.tsx
Locale 新增 hours/minutes/seconds/millisecondshourSelect/.../meridiemSelect 共 9 个必填字段;TimeColumn 引入 TimeUnitType 别名,Unit.labelReact.ReactText 改为 string | number
TimeColumn 无障碍辅助函数与渲染更新
src/PickerPanel/TimePanel/TimePanelBody/TimeColumn.tsx, src/PickerPanel/TimePanel/TimePanelBody/index.tsx
新增 getListLabel/getListItemLabel 函数;ul 增加 role="listbox"aria-labelli 增加 role="option"aria-labelaria-selectedaria-disabledTimePanelBody 容器新增 role="group"
全部语言包时间字段补全
src/locale/*.ts(70+ 个文件)
向所有语言包 locale 对象中统一添加时间单位显示文案与时间选择器提示文案(hours/minutes/seconds/milliseconds 及各 *Select 字段)。

估计代码审查工作量

🎯 3 (Moderate) | ⏱️ ~20 分钟

可能相关的 PR

  • react-component/picker#926:同样修改了 TimeColumn 的渲染逻辑,涉及列表项样式与选中状态,与本次 ARIA 属性更新直接相关。
  • react-component/picker#904:同样扩展了 src/interface.tsxLocale 类型并更新了多个语言包,扩展方向为 week 字段,与本次时间字段扩展模式一致。

建议审查者

  • zombieJ

小诗

🐰 时间列表加上标签,
小时分秒皆有名,
七十语言同更新,
无障碍访问更轻盈,
兔子跳跃代码间,
ARIA 角色闪光明 ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题与本次 Time panel 的可访问性/语义增强相关,虽然“keyboard navigation”在摘要中未明确体现。
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request improves the accessibility of the time picker components by adding ARIA roles and labels (such as role="listbox", role="option", and role="group") to TimeColumn and TimePanelBody. It also expands the Locale interface and updates numerous locale files with translations for hours, minutes, seconds, milliseconds, and select labels. The review feedback suggests using optional chaining and safe fallbacks for the new locale properties to prevent potential undefined values at runtime when using older or custom locales, and adding an aria-label to the group container in TimePanelBody to ensure it is properly announced by screen readers.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +34 to +66
function getListLabel(type: TimeUnitType, locale: Locale) {
switch (type) {
case 'hour':
return locale.hourSelect;
case 'minute':
return locale.minuteSelect;
case 'second':
return locale.secondSelect;
case 'millisecond':
return locale.millisecondSelect;
case 'meridiem':
return locale.meridiemSelect;
default:
return '';
}
}

function getListItemLabel(type: TimeUnitType, value: string | number, locale: Locale) {
switch (type) {
case 'hour':
return `${value} ${locale.hours}`;
case 'minute':
return `${value} ${locale.minutes}`;
case 'second':
return `${value} ${locale.seconds}`;
case 'millisecond':
return `${value} ${locale.milliseconds}`;
case 'meridiem':
return value.toString();
default:
return '';
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

When users provide custom or older locale configurations, the newly added properties (such as hours, minutes, seconds, milliseconds, and their corresponding Select labels) might be undefined at runtime. Accessing them directly in template literals (e.g., `${value} ${locale.hours}`) will result in strings like "12 undefined" being read by screen readers.

Using optional chaining and providing safe fallbacks prevents this issue and ensures a robust user experience.

function getListLabel(type: TimeUnitType, locale: Locale) {
  switch (type) {
    case 'hour':
      return locale?.hourSelect || '';
    case 'minute':
      return locale?.minuteSelect || '';
    case 'second':
      return locale?.secondSelect || '';
    case 'millisecond':
      return locale?.millisecondSelect || '';
    case 'meridiem':
      return locale?.meridiemSelect || '';
    default:
      return '';
  }
}

function getListItemLabel(type: TimeUnitType, value: string | number, locale: Locale) {
  switch (type) {
    case 'hour':
      return locale?.hours ? `${value} ${locale.hours}` : value.toString();
    case 'minute':
      return locale?.minutes ? `${value} ${locale.minutes}` : value.toString();
    case 'second':
      return locale?.seconds ? `${value} ${locale.seconds}` : value.toString();
    case 'millisecond':
      return locale?.milliseconds ? `${value} ${locale.milliseconds}` : value.toString();
    case 'meridiem':
      return value.toString();
    default:
      return '';
  }
}

Comment on lines +274 to +278
<div
role="group"
className={clsx(`${prefixCls}-content`, classNames.content)}
style={styles.content}
>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The container div has been given role="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. Adding aria-label={locale?.timeSelect} provides the necessary context for assistive technologies.

Suggested change
<div
role="group"
className={clsx(`${prefixCls}-content`, classNames.content)}
style={styles.content}
>
<div
role="group"
aria-label={locale?.timeSelect}
className={clsx(`${prefixCls}-content`, classNames.content)}
style={styles.content}
>

@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.81%. Comparing base (6f6bbb3) to head (0c9bb54).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #987   +/-   ##
=======================================
  Coverage   98.81%   98.81%           
=======================================
  Files          66       66           
  Lines        2698     2711   +13     
  Branches      749      749           
=======================================
+ Hits         2666     2679   +13     
  Misses         29       29           
  Partials        3        3           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

Note

Due to the large number of review comments, Critical, Major severity comments were prioritized as inline comments.

🟡 Minor comments (23)
src/PickerPanel/TimePanel/TimePanelBody/TimeColumn.tsx-136-143 (1)

136-143: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

为时间列补上可达的焦点管理
src/PickerPanel/TimePanel/TimePanelBody/TimeColumn.tsx:136-143 这里只暴露了 role="listbox"/"option",但 ul 本身不可聚焦,也没有 aria-activedescendant;如果上层没有把焦点/键盘事件转到这列,读屏和键盘就进不到这里。建议补 tabIndex 或改成受控的 active-descendant 模式。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/PickerPanel/TimePanel/TimePanelBody/TimeColumn.tsx` around lines 136 -
143, The TimeColumn listbox is not keyboard-accessible because the ul only
exposes role/listbox semantics without a focus target or active descendant
control. Update TimeColumn in TimePanelBody to make the listbox focusable with
tabIndex or wire it to a proper aria-activedescendant pattern, and ensure the
selected/active option is tracked through the existing option rendering and
scroll handling so keyboard and screen reader focus can reach this column.
src/locale/gl_ES.ts-15-18 (1)

15-18: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

这些单位文案会让单数选项的 aria-label 不正确。

TimeColumn.tsx 会直接拼出 ${value} ${unit}。这里的复数形式会让读屏结果变成 1 Horas1 Segundos 这种不正确的标签。建议改成对所有数值都可用的写法,或把单复数处理放回组件。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/locale/gl_ES.ts` around lines 15 - 18, The locale labels in gl_ES.ts use
plural unit names that make TimeColumn.tsx build incorrect aria-labels like “1
Horas” and “1 Segundos”. Update the unit strings in the locale mapping to values
that work for any numeric value, or adjust TimeColumn.tsx so it handles
singular/plural formatting instead of concatenating `${value} ${unit}` directly;
use the TimeColumn and locale keys for hours, minutes, seconds, and milliseconds
to locate the change.
src/locale/fr_FR.ts-15-18 (1)

15-18: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

这些单位文案会生成错误的单数 aria-label。

TimeColumn.tsx 会直接把它们拼成 ${value} ${unit}。这里使用复数形式后,屏幕阅读器会读出 1 Heures1 Secondes 之类不正确的标签。建议改成对任意数值都成立的中性写法,或把单复数处理放回 TimeColumn

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/locale/fr_FR.ts` around lines 15 - 18, The localized unit labels in
fr_FR.ts are using plural forms that get concatenated by TimeColumn.tsx into
aria-labels like “1 Heures” and “1 Secondes”. Update the entries for hours,
minutes, seconds, and milliseconds to neutral singular-safe wording, or adjust
TimeColumn so it handles singular/plural forms instead of blindly using ${value}
${unit}. Use the TimeColumn and locale keys to find the affected path.
src/locale/he_IL.ts-15-18 (1)

15-18: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

这些单位文案会生成错误的单数读屏标签。

下游会直接把数值和这些单位拼成 aria-label。当前使用复数形式后,像 1 שעות 这样的结果会是错误的。建议改成数值无关的单位写法,或在 TimeColumn 中处理词形变化。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/locale/he_IL.ts` around lines 15 - 18, The time unit labels in he_IL
currently use plural forms, which will produce incorrect aria-label text when
combined with a value like 1 in downstream rendering. Update the locale entries
for the affected unit symbols in the locale file to use value-independent
wording, or adjust the TimeColumn formatting logic to handle singular/plural
inflection before composing the label.
src/locale/hi_IN.ts-15-18 (1)

15-18: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

这些单位词形不适合作为所有数值选项的固定 aria-label 后缀。

下游会直接生成 ${value} ${unit}。按当前写法,至少会出现 1 घंटे 这种不自然的单数标签。建议改成数值无关的单位写法,或在 TimeColumn 中处理单复数/词形变化。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/locale/hi_IN.ts` around lines 15 - 18, The fixed unit strings in the
hi_IN locale are not suitable for every aria-label value because TimeColumn
concatenates them directly as "${value} ${unit}", which produces incorrect forms
like singular-plural mismatches. Update the hi_IN entries for hours, minutes,
seconds, and milliseconds to use value-agnostic unit wording, or adjust
TimeColumn to choose the correct singular/plural form before building the
aria-label.
src/locale/hr_HR.ts-15-18 (1)

15-18: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

这些单位词形不适合作为所有数值选项的固定后缀。

TimeColumn.tsx 会直接把它们拼进 ${value} ${unit}。当前写法至少会生成 1 Sati 这类不正确的读屏标签。建议改成对任意数值都成立的中性写法,或把词形变化放到组件层处理。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/locale/hr_HR.ts` around lines 15 - 18, The unit labels in the hr_HR
locale are being used as a fixed suffix by TimeColumn.tsx via `${value}
${unit}`, so the current plural/gendered forms like hours and minutes produce
incorrect strings for some values. Update the locale entries referenced by the
TimeColumn component to neutral forms that work for any numeric value, or adjust
TimeColumn to choose the correct inflected form based on the value; use the unit
keys in hr_HR.ts and the TimeColumn.tsx formatting path to locate the change.
src/locale/ga_IE.ts-15-18 (1)

15-18: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

这些单位词形不适合作为所有数值选项的固定后缀。

下游会直接生成 ${value} ${unit}aria-label。当前写法里至少会出现 1 Uaireanta 这类不自然的读法,影响读屏结果。建议改成数值无关的中性写法,或在 TimeColumn 中做词形变化。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/locale/ga_IE.ts` around lines 15 - 18, The Gaelic unit labels in ga_IE
are being used as fixed suffixes in the aria-label generation, so plural forms
like hours/minutes need to be replaced with number-neutral terms or handled with
proper inflection logic. Update the locale entries in the ga_IE time labels so
`${value} ${unit}` stays natural for all values, or adjust TimeColumn to choose
the correct form based on the numeric value, using the existing locale keys for
hours, minutes, seconds, and milliseconds.
src/locale/fr_CA.ts-15-18 (1)

15-18: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

这些单位文案会生成错误的单数 aria-label。

TimeColumn.tsx 会直接把它们拼成 ${value} ${unit}。这里使用复数形式后,屏幕阅读器会读出 1 Heures1 Secondes 之类不正确的标签。建议改成对任意数值都成立的中性写法,或把单复数处理放回 TimeColumn

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/locale/fr_CA.ts` around lines 15 - 18, The locale strings in fr_CA.ts for
TimeColumn are using plural unit labels that get concatenated directly in
TimeColumn.tsx as “${value} ${unit}”, which produces incorrect aria-labels for
singular values. Update the unit entries referenced by TimeColumn to neutral
forms that work for both singular and plural, or move singular/plural selection
into TimeColumn so the generated labels are correct for all values.
src/locale/it_IT.ts-28-28 (1)

28-28: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

meridiemSelect 这里翻成了“子午线”,语义不对。

这个字段对应的是 AM/PM 时段选择,不是地理意义上的 meridiano。当前读屏会把该列读成 “Seleziona il meridiano”,语义会误导用户。建议改成直接指向 AM/PM 的文案。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/locale/it_IT.ts` at line 28, The localized label for meridiemSelect in
the Italian locale uses the wrong meaning (“meridiano”) instead of the AM/PM
time period selector. Update the it_IT translation entry for meridiemSelect to a
phrase that clearly refers to AM/PM selection, and keep the change limited to
the locale string so the UI and screen reader announce the correct time-period
choice.
src/locale/pt_BR.ts-28-28 (1)

28-28: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

meridiemSelect 还是英文/技术术语。

Line 28 会直接成为时间列的 aria-label;在 pt-BR 下让屏幕阅读器读出 meridiem 不够自然,也和这次“补全本地化文案”的目标不一致。建议换成该 locale 常用的 AM/PM 或对应本地表达。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/locale/pt_BR.ts` at line 28, The pt_BR locale string for meridiemSelect
is still using the English/technical term “meridiem”; update the pt_BR
translation in the locale object so the time-column aria-label uses a natural
Brazilian Portuguese AM/PM equivalent or local phrasing. Locate the
meridiemSelect entry in the pt_BR translation file and replace it with a fully
localized label consistent with the rest of the locale.
src/locale/nl_NL.ts-28-28 (1)

28-28: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

meridiemSelect 还没有真正本地化。

Line 28 的值会被 src/PickerPanel/TimePanel/TimePanelBody/TimeColumn.tsx 直接作为 aria-label 使用;meridiem 对荷兰语用户来说仍是生硬的外来术语。建议替换成该 locale 常见的 AM/PM 或对应本地表达。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/locale/nl_NL.ts` at line 28, The meridiemSelect locale string in nl_NL is
still using the untranslated term “meridiem”, so update the nl_NL entry to a
Dutch-friendly AM/PM label or equivalent local wording. Change the value in the
locale object used by TimeColumn’s aria-label so the string is natural for Dutch
users, while keeping the meridiemSelect key unchanged.
src/locale/pt_PT.ts-28-28 (1)

28-28: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

meridiemSelect 仍未本地化。

Line 28 的值会被 src/PickerPanel/TimePanel/TimePanelBody/TimeColumn.tsx 直接作为列表 aria-label 读出;meridiem 在 pt-PT 里仍像占位术语,不像面向最终用户的可访问文案。建议替换为该 locale 常用的 AM/PM 或对应本地表达。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/locale/pt_PT.ts` at line 28, The `meridiemSelect` locale string in
`pt_PT.ts` is still not user-facing enough for the `TimeColumn` aria-label.
Update the `meridiemSelect` entry in the Portuguese locale to a real pt-PT
accessible label using the locale’s usual AM/PM wording or equivalent local
expression, so `src/PickerPanel/TimePanel/TimePanelBody/TimeColumn.tsx` reads a
properly localized value.
src/locale/nl_BE.ts-28-28 (1)

28-28: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

meridiemSelect 仍然是未本地化术语。

Line 28 现在会被 src/PickerPanel/TimePanel/TimePanelBody/TimeColumn.tsx 直接读作列表的 aria-label;保留 meridiem 会让荷兰语环境中的屏幕阅读器读出外来术语。这里建议改成该 locale 更常用的 AM/PM/上下午表述。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/locale/nl_BE.ts` at line 28, `meridiemSelect` in the nl_BE locale is
still using the untranslated term “meridiem”, which is surfaced directly by
`TimeColumn.tsx` as the list `aria-label`. Update the `meridiemSelect` string in
the locale object to a Dutch phrase that matches the locale’s common AM/PM or
ochtend/middag wording so screen readers don’t announce a foreign term.
src/locale/sr_RS.ts-24-28 (1)

24-28: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

统一 Select 提示语气。

Line 24-28 改成了 Izaberite ...,但本文件其他选择提示仍是 Izaberi ...。这组字符串会直接用于 aria-label,建议保持同一种语气,避免同一 locale 内部前后不一致。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/locale/sr_RS.ts` around lines 24 - 28, The Serbian locale selection
labels are inconsistent: the hour/minute/second/millisecond/meridiem entries in
sr_RS.ts use “Izaberite ...” while the rest of the locale uses “Izaberi ...”.
Update those select prompt strings in the locale object so they all follow the
same phrasing style as the other selection labels and remain consistent for
aria-label usage.
src/locale/sr_Cyrl_RS.ts-24-28 (1)

24-28: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

保持选择提示的人称/语气一致。

Line 24-28 使用了 Изаберите ...,但同文件现有的 timeSelect/dateSelect/monthSelect/yearSelect/decadeSelect 仍是 Изабери ...。这会让读屏提示在同一语言包里忽然切换语气,建议统一。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/locale/sr_Cyrl_RS.ts` around lines 24 - 28, The Serbian time selection
labels in this locale file use a different imperative form than the existing
date/month/year/decade prompts, causing inconsistent screen-reader phrasing.
Update the related entries in the locale object around the time selection
strings so the wording matches the same tone used by timeSelect, dateSelect,
monthSelect, yearSelect, and decadeSelect, keeping the names hourSelect,
minuteSelect, secondSelect, millisecondSelect, and meridiemSelect easy to find.
src/locale/sk_SK.ts-24-28 (1)

24-28: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

统一 *Select 文案语气。

Line 24-28 从现有的 Vybrať ... 切到了 Vyberte ...,和同文件的 timeSelect/dateSelect/monthSelect/yearSelect/decadeSelect 不一致。既然这些值会直接进入 aria-label,建议统一成同一种表达方式。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/locale/sk_SK.ts` around lines 24 - 28, The `*Select` labels in the locale
object are inconsistent with the rest of the same file: `hourSelect`,
`minuteSelect`, `secondSelect`, `millisecondSelect`, and `meridiemSelect` use a
different imperative form than `timeSelect`, `dateSelect`, `monthSelect`,
`yearSelect`, and `decadeSelect`. Update the `sk_SK` locale entries in the
translation map to use one consistent wording style across all `*Select` strings
so the aria-label text reads uniformly.
src/locale/da_DK.ts-28-28 (1)

28-28: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

meridiemSelect 仍未本地化。

Line 28 里的 meridiem 还是英文;它会被 TimeColumn 直接拿去生成 aria-label,所以丹麦语读屏文案会混入英文,和这次补全本地化字符串的目标不一致。请改成丹麦语里实际使用的说法,或至少改成本地习惯的 AM/PM 表述。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/locale/da_DK.ts` at line 28, The meridiemSelect locale string in da_DK is
still using an English term, so update the locale entry in the da_DK translation
object to a Danish-native label or local AM/PM wording. Check the meridiemSelect
field used by TimeColumn for aria-label generation and replace it with the
proper Danish phrase so screen-reader text stays fully localized.
src/locale/tl_PH.ts-29-29 (1)

29-29: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

meridiemSelect 还是英文占位词。

Line 29 的 meridiem 没有本地化;这个值会进入时间面板的 aria-label,因此菲律宾语环境下读屏会读到英文术语。建议改成该语言里实际使用的上/下午表述,或使用本地习惯的 AM/PM

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/locale/tl_PH.ts` at line 29, The locale string for meridiemSelect in
tl_PH is still using an English placeholder, so update the translation in the
tl_PH locale object to a proper Filipino meridiem label or the locally expected
AM/PM wording. Use the existing locale entry for meridiemSelect as the target
symbol and ensure the aria-label text in the time panel is fully localized.
src/locale/uz_UZ.ts-29-29 (1)

29-29: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

避免在 aria 文案里直接暴露英文术语 Meridiem

Line 29 的 Meridiemni tanlang 会直接进入时间列的 aria-label。这里保留英文技术词会让本地化不完整,建议改成乌兹别克语里更常见的 AM/PM/时段选择表述。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/locale/uz_UZ.ts` at line 29, The aria label for the meridiem selector
still exposes the English term “Meridiem,” so update the localized string in
uz_UZ.ts for meridiemSelect to use a natural Uzbek AM/PM or time-period phrase
instead. Keep the change within the locale entry itself so the time column’s
aria-label reads fully localized text when rendered.
src/locale/uk_UA.ts-28-28 (1)

28-28: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

meridiemSelect 改成更自然的乌克兰语提示。

Line 28 的 Виберіть меридієм 会被 TimeColumn 直接用作 aria-label,技术词感太强,读屏可理解性偏弱。这里更适合换成用户常见表述,例如“Виберіть час доби”或直接说明 AM/PM。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/locale/uk_UA.ts` at line 28, The `meridiemSelect` label in `uk_UA.ts` is
too technical for the aria-label used by `TimeColumn`; update the string to a
more natural Ukrainian phrase that users will recognize, such as a “time of day”
or AM/PM-oriented prompt. Keep the change localized to the `meridiemSelect`
entry in the locale object so the accessibility label reads clearly for screen
readers.
src/locale/fi_FI.ts-19-19 (1)

19-19: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

拼写错误:Valise 应为 Valitse

timeSelect: 'Valise aika' 拼写有误,本文件其余的选择文案均为 Valitse ...(如第 20–27 行),应统一为 Valitse aika

✏️ 建议修改
-  timeSelect: 'Valise aika',
+  timeSelect: 'Valitse aika',
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/locale/fi_FI.ts` at line 19, The fi_FI locale entry in the time selection
label has a spelling mistake: update the `timeSelect` string in `fi_FI.ts` from
the incorrect “Valise” form to the consistent “Valitse” form used by the other
selection labels in the same locale file. Keep the change localized to the
`timeSelect` translation key and ensure it matches the surrounding Finnish
wording style.
src/locale/fr_BE.ts-20-20 (1)

20-20: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

复制粘贴错误:dateSelect 文案错误。

dateSelect: "Sélectionner l'heure" 与第 19 行 timeSelect 完全相同,描述的是“时间”而非“日期”。这会让日期选择的 aria 文案/提示出现错误语义。应改为 “Sélectionner la date”。

✏️ 建议修改
-  dateSelect: "Sélectionner l'heure",
+  dateSelect: 'Sélectionner la date',
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/locale/fr_BE.ts` at line 20, The `dateSelect` translation in `fr_BE.ts`
is a copy-paste mistake and currently uses the same wording as `timeSelect`, so
update the `dateSelect` entry in the locale object to the correct French text
for selecting a date, and verify the nearby `timeSelect`/`dateSelect` labels
remain distinct and semantically accurate.
src/locale/es_MX.ts-29-29 (1)

29-29: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

“meridiem” 未本地化。

meridiemSelect: 'Seleccionar meridiem' 中的 “meridiem” 是英文/拉丁语词,并非标准西班牙语。建议改为 “meridiano” 或使用 “AM/PM”,与其它语言包保持一致的本地化处理。

✏️ 建议修改
-  meridiemSelect: 'Seleccionar meridiem',
+  meridiemSelect: 'Seleccionar un meridiano',
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/locale/es_MX.ts` at line 29, The es_MX locale entry for meridiemSelect
still uses the non-localized word “meridiem”; update the string in the locale
object to a proper Spanish equivalent such as “meridiano” or “AM/PM” so it
matches the rest of the translations. Keep the change confined to the
meridiemSelect key in the es_MX locale definition.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/interface.tsx`:
- Around line 69-82: The new locale fields on the public Locale type should not
be made required because that breaks existing custom locale objects. Update the
Locale definition to make these added fields optional, then adjust TimeColumn to
use fallback values whenever a field is missing so existing consumers keep
compiling and behavior stays unchanged.

In `@src/locale/bg_BG.ts`:
- Around line 15-18: Update the Bulgarian locale entries in the locale object so
time unit labels are not fixed plural nouns, since TimeColumn builds aria labels
like “${value} ${locale.hours}” and will read singular values incorrectly.
Adjust the locale shape used by TimeColumn to provide value-aware formatters or
separate singular/plural fields for hours, minutes, seconds, and milliseconds,
then wire the TimePanel/TimeColumn consumers to use those symbols instead of
static strings.

In `@src/locale/lt_LT.ts`:
- Around line 15-18: `TimeColumn.tsx` currently builds aria-labels by
concatenating a numeric value with static unit strings from `lt_LT`, which
produces incorrect Lithuanian forms like `1 Valandos`. Update the
`TimeColumn`/locale contract so the label is generated from the full numeric
value, not a fixed unit token, and adjust `lt_LT` to provide a value-aware
formatter or singular/plural-aware unit labels for `hours`, `minutes`,
`seconds`, and `milliseconds`. Use the `TimeColumn` and `lt_LT` symbols to
locate the affected logic.

In `@src/locale/nb_NO.ts`:
- Around line 15-18: The fixed unit strings in the locale contract are causing
incorrect aria-labels when TimeColumn concatenates numeric values with
hours/minutes/seconds/milliseconds. Update the Locale API used by TimeColumn and
the locale files (including nb_NO) so unit labels are generated from the value
at runtime, rather than stored as a single static string; refactor the relevant
formatter/template shape in TimeColumn and its locale consumers to support
singular/plural or language-specific inflection.

In `@src/locale/pl_PL.ts`:
- Around line 15-18: The current locale contract cannot produce correct Polish
time labels because TimeColumn builds aria-labels by concatenating numbers with
the plural-only strings from pl_PL. Update the Locale contract and the
getListItemLabel() path used by TimeColumn so the label can be chosen based on
the numeric value and return the correct Polish word form instead of a single
static field. Keep the fix centered around the locale interface and the
TimeColumn/getListItemLabel integration, rather than adjusting only the pl_PL
text values.

In `@src/PickerPanel/TimePanel/TimePanelBody/TimeColumn.tsx`:
- Around line 51-63: The aria-label generation in TimeColumn’s getListItemLabel
is too naive: it concatenates raw values with locale unit names, which breaks
pluralization and can misread meridiem items. Update the TimeColumn item label
logic to use the locale’s formatter/template or existing localized unit label
instead of hardcoding `${value} ${locale.xxx}`; in particular, make the meridiem
branch reuse the already localized label passed from TimePanelBody rather than
returning the raw value.

---

Minor comments:
In `@src/locale/da_DK.ts`:
- Line 28: The meridiemSelect locale string in da_DK is still using an English
term, so update the locale entry in the da_DK translation object to a
Danish-native label or local AM/PM wording. Check the meridiemSelect field used
by TimeColumn for aria-label generation and replace it with the proper Danish
phrase so screen-reader text stays fully localized.

In `@src/locale/es_MX.ts`:
- Line 29: The es_MX locale entry for meridiemSelect still uses the
non-localized word “meridiem”; update the string in the locale object to a
proper Spanish equivalent such as “meridiano” or “AM/PM” so it matches the rest
of the translations. Keep the change confined to the meridiemSelect key in the
es_MX locale definition.

In `@src/locale/fi_FI.ts`:
- Line 19: The fi_FI locale entry in the time selection label has a spelling
mistake: update the `timeSelect` string in `fi_FI.ts` from the incorrect
“Valise” form to the consistent “Valitse” form used by the other selection
labels in the same locale file. Keep the change localized to the `timeSelect`
translation key and ensure it matches the surrounding Finnish wording style.

In `@src/locale/fr_BE.ts`:
- Line 20: The `dateSelect` translation in `fr_BE.ts` is a copy-paste mistake
and currently uses the same wording as `timeSelect`, so update the `dateSelect`
entry in the locale object to the correct French text for selecting a date, and
verify the nearby `timeSelect`/`dateSelect` labels remain distinct and
semantically accurate.

In `@src/locale/fr_CA.ts`:
- Around line 15-18: The locale strings in fr_CA.ts for TimeColumn are using
plural unit labels that get concatenated directly in TimeColumn.tsx as “${value}
${unit}”, which produces incorrect aria-labels for singular values. Update the
unit entries referenced by TimeColumn to neutral forms that work for both
singular and plural, or move singular/plural selection into TimeColumn so the
generated labels are correct for all values.

In `@src/locale/fr_FR.ts`:
- Around line 15-18: The localized unit labels in fr_FR.ts are using plural
forms that get concatenated by TimeColumn.tsx into aria-labels like “1 Heures”
and “1 Secondes”. Update the entries for hours, minutes, seconds, and
milliseconds to neutral singular-safe wording, or adjust TimeColumn so it
handles singular/plural forms instead of blindly using ${value} ${unit}. Use the
TimeColumn and locale keys to find the affected path.

In `@src/locale/ga_IE.ts`:
- Around line 15-18: The Gaelic unit labels in ga_IE are being used as fixed
suffixes in the aria-label generation, so plural forms like hours/minutes need
to be replaced with number-neutral terms or handled with proper inflection
logic. Update the locale entries in the ga_IE time labels so `${value} ${unit}`
stays natural for all values, or adjust TimeColumn to choose the correct form
based on the numeric value, using the existing locale keys for hours, minutes,
seconds, and milliseconds.

In `@src/locale/gl_ES.ts`:
- Around line 15-18: The locale labels in gl_ES.ts use plural unit names that
make TimeColumn.tsx build incorrect aria-labels like “1 Horas” and “1 Segundos”.
Update the unit strings in the locale mapping to values that work for any
numeric value, or adjust TimeColumn.tsx so it handles singular/plural formatting
instead of concatenating `${value} ${unit}` directly; use the TimeColumn and
locale keys for hours, minutes, seconds, and milliseconds to locate the change.

In `@src/locale/he_IL.ts`:
- Around line 15-18: The time unit labels in he_IL currently use plural forms,
which will produce incorrect aria-label text when combined with a value like 1
in downstream rendering. Update the locale entries for the affected unit symbols
in the locale file to use value-independent wording, or adjust the TimeColumn
formatting logic to handle singular/plural inflection before composing the
label.

In `@src/locale/hi_IN.ts`:
- Around line 15-18: The fixed unit strings in the hi_IN locale are not suitable
for every aria-label value because TimeColumn concatenates them directly as
"${value} ${unit}", which produces incorrect forms like singular-plural
mismatches. Update the hi_IN entries for hours, minutes, seconds, and
milliseconds to use value-agnostic unit wording, or adjust TimeColumn to choose
the correct singular/plural form before building the aria-label.

In `@src/locale/hr_HR.ts`:
- Around line 15-18: The unit labels in the hr_HR locale are being used as a
fixed suffix by TimeColumn.tsx via `${value} ${unit}`, so the current
plural/gendered forms like hours and minutes produce incorrect strings for some
values. Update the locale entries referenced by the TimeColumn component to
neutral forms that work for any numeric value, or adjust TimeColumn to choose
the correct inflected form based on the value; use the unit keys in hr_HR.ts and
the TimeColumn.tsx formatting path to locate the change.

In `@src/locale/it_IT.ts`:
- Line 28: The localized label for meridiemSelect in the Italian locale uses the
wrong meaning (“meridiano”) instead of the AM/PM time period selector. Update
the it_IT translation entry for meridiemSelect to a phrase that clearly refers
to AM/PM selection, and keep the change limited to the locale string so the UI
and screen reader announce the correct time-period choice.

In `@src/locale/nl_BE.ts`:
- Line 28: `meridiemSelect` in the nl_BE locale is still using the untranslated
term “meridiem”, which is surfaced directly by `TimeColumn.tsx` as the list
`aria-label`. Update the `meridiemSelect` string in the locale object to a Dutch
phrase that matches the locale’s common AM/PM or ochtend/middag wording so
screen readers don’t announce a foreign term.

In `@src/locale/nl_NL.ts`:
- Line 28: The meridiemSelect locale string in nl_NL is still using the
untranslated term “meridiem”, so update the nl_NL entry to a Dutch-friendly
AM/PM label or equivalent local wording. Change the value in the locale object
used by TimeColumn’s aria-label so the string is natural for Dutch users, while
keeping the meridiemSelect key unchanged.

In `@src/locale/pt_BR.ts`:
- Line 28: The pt_BR locale string for meridiemSelect is still using the
English/technical term “meridiem”; update the pt_BR translation in the locale
object so the time-column aria-label uses a natural Brazilian Portuguese AM/PM
equivalent or local phrasing. Locate the meridiemSelect entry in the pt_BR
translation file and replace it with a fully localized label consistent with the
rest of the locale.

In `@src/locale/pt_PT.ts`:
- Line 28: The `meridiemSelect` locale string in `pt_PT.ts` is still not
user-facing enough for the `TimeColumn` aria-label. Update the `meridiemSelect`
entry in the Portuguese locale to a real pt-PT accessible label using the
locale’s usual AM/PM wording or equivalent local expression, so
`src/PickerPanel/TimePanel/TimePanelBody/TimeColumn.tsx` reads a properly
localized value.

In `@src/locale/sk_SK.ts`:
- Around line 24-28: The `*Select` labels in the locale object are inconsistent
with the rest of the same file: `hourSelect`, `minuteSelect`, `secondSelect`,
`millisecondSelect`, and `meridiemSelect` use a different imperative form than
`timeSelect`, `dateSelect`, `monthSelect`, `yearSelect`, and `decadeSelect`.
Update the `sk_SK` locale entries in the translation map to use one consistent
wording style across all `*Select` strings so the aria-label text reads
uniformly.

In `@src/locale/sr_Cyrl_RS.ts`:
- Around line 24-28: The Serbian time selection labels in this locale file use a
different imperative form than the existing date/month/year/decade prompts,
causing inconsistent screen-reader phrasing. Update the related entries in the
locale object around the time selection strings so the wording matches the same
tone used by timeSelect, dateSelect, monthSelect, yearSelect, and decadeSelect,
keeping the names hourSelect, minuteSelect, secondSelect, millisecondSelect, and
meridiemSelect easy to find.

In `@src/locale/sr_RS.ts`:
- Around line 24-28: The Serbian locale selection labels are inconsistent: the
hour/minute/second/millisecond/meridiem entries in sr_RS.ts use “Izaberite ...”
while the rest of the locale uses “Izaberi ...”. Update those select prompt
strings in the locale object so they all follow the same phrasing style as the
other selection labels and remain consistent for aria-label usage.

In `@src/locale/tl_PH.ts`:
- Line 29: The locale string for meridiemSelect in tl_PH is still using an
English placeholder, so update the translation in the tl_PH locale object to a
proper Filipino meridiem label or the locally expected AM/PM wording. Use the
existing locale entry for meridiemSelect as the target symbol and ensure the
aria-label text in the time panel is fully localized.

In `@src/locale/uk_UA.ts`:
- Line 28: The `meridiemSelect` label in `uk_UA.ts` is too technical for the
aria-label used by `TimeColumn`; update the string to a more natural Ukrainian
phrase that users will recognize, such as a “time of day” or AM/PM-oriented
prompt. Keep the change localized to the `meridiemSelect` entry in the locale
object so the accessibility label reads clearly for screen readers.

In `@src/locale/uz_UZ.ts`:
- Line 29: The aria label for the meridiem selector still exposes the English
term “Meridiem,” so update the localized string in uz_UZ.ts for meridiemSelect
to use a natural Uzbek AM/PM or time-period phrase instead. Keep the change
within the locale entry itself so the time column’s aria-label reads fully
localized text when rendered.

In `@src/PickerPanel/TimePanel/TimePanelBody/TimeColumn.tsx`:
- Around line 136-143: The TimeColumn listbox is not keyboard-accessible because
the ul only exposes role/listbox semantics without a focus target or active
descendant control. Update TimeColumn in TimePanelBody to make the listbox
focusable with tabIndex or wire it to a proper aria-activedescendant pattern,
and ensure the selected/active option is tracked through the existing option
rendering and scroll handling so keyboard and screen reader focus can reach this
column.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: db3663c3-5e45-4a06-b38c-acea32031967

📥 Commits

Reviewing files that changed from the base of the PR and between 6f6bbb3 and d566890.

⛔ Files ignored due to path filters (1)
  • tests/__snapshots__/panel.spec.tsx.snap is excluded by !**/*.snap
📒 Files selected for processing (77)
  • src/PickerPanel/TimePanel/TimePanelBody/TimeColumn.tsx
  • src/PickerPanel/TimePanel/TimePanelBody/index.tsx
  • src/interface.tsx
  • src/locale/am_ET.ts
  • src/locale/ar_EG.ts
  • src/locale/az_AZ.ts
  • src/locale/bg_BG.ts
  • src/locale/bn_BD.ts
  • src/locale/by_BY.ts
  • src/locale/ca_ES.ts
  • src/locale/cs_CZ.ts
  • src/locale/da_DK.ts
  • src/locale/de_DE.ts
  • src/locale/el_GR.ts
  • src/locale/en_GB.ts
  • src/locale/en_US.ts
  • src/locale/es_ES.ts
  • src/locale/es_MX.ts
  • src/locale/et_EE.ts
  • src/locale/eu_ES.ts
  • src/locale/fa_IR.ts
  • src/locale/fi_FI.ts
  • src/locale/fr_BE.ts
  • src/locale/fr_CA.ts
  • src/locale/fr_FR.ts
  • src/locale/ga_IE.ts
  • src/locale/gl_ES.ts
  • src/locale/he_IL.ts
  • src/locale/hi_IN.ts
  • src/locale/hr_HR.ts
  • src/locale/hu_HU.ts
  • src/locale/id_ID.ts
  • src/locale/is_IS.ts
  • src/locale/it_IT.ts
  • src/locale/ja_JP.ts
  • src/locale/ka_GE.ts
  • src/locale/kk_KZ.ts
  • src/locale/km_KH.ts
  • src/locale/kmr_IQ.ts
  • src/locale/kn_IN.ts
  • src/locale/ko_KR.ts
  • src/locale/lt_LT.ts
  • src/locale/lv_LV.ts
  • src/locale/mk_MK.ts
  • src/locale/ml_IN.ts
  • src/locale/mn_MN.ts
  • src/locale/mr_IN.ts
  • src/locale/ms_MY.ts
  • src/locale/my_MM.ts
  • src/locale/nb_NO.ts
  • src/locale/ne_NP.ts
  • src/locale/nl_BE.ts
  • src/locale/nl_NL.ts
  • src/locale/pl_PL.ts
  • src/locale/pt_BR.ts
  • src/locale/pt_PT.ts
  • src/locale/ro_RO.ts
  • src/locale/ru_RU.ts
  • src/locale/si_LK.ts
  • src/locale/sk_SK.ts
  • src/locale/sl_SI.ts
  • src/locale/sr_Cyrl_RS.ts
  • src/locale/sr_RS.ts
  • src/locale/sv_SE.ts
  • src/locale/ta_IN.ts
  • src/locale/te_IN.ts
  • src/locale/th_TH.ts
  • src/locale/tk_TK.ts
  • src/locale/tl_PH.ts
  • src/locale/tr_TR.ts
  • src/locale/ug_CN.ts
  • src/locale/uk_UA.ts
  • src/locale/ur_PK.ts
  • src/locale/uz_UZ.ts
  • src/locale/vi_VN.ts
  • src/locale/zh_CN.ts
  • src/locale/zh_TW.ts

Comment thread src/interface.tsx
Comment on lines +69 to +82
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;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

不要把新增 locale 字段设为必填。

Locale 是导出的公共类型。把这 9 个字段直接改成必填会让现有自定义 locale 对象在升级后全部类型报错,属于破坏性 API 变更。更稳妥的是先改成可选,并在 TimeColumn 里为缺省值提供 fallback。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/interface.tsx` around lines 69 - 82, The new locale fields on the public
Locale type should not be made required because that breaks existing custom
locale objects. Update the Locale definition to make these added fields
optional, then adjust TimeColumn to use fallback values whenever a field is
missing so existing consumers keep compiling and behavior stays unchanged.

Comment thread src/locale/bg_BG.ts
Comment on lines +15 to +18
hours: 'Часове',
minutes: 'Минути',
seconds: 'Секунди',
milliseconds: 'Милисекунди',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

不要把时间项读法压缩成单个静态名词。

src/PickerPanel/TimePanel/TimePanelBody/TimeColumn.tsx:34-65 会直接拼出 ${value} ${locale.hours} 这样的 aria-label。这里使用固定复数后,单数项会被读成 1 Часове1 Секунди 这类错误词形,读屏文案会稳定出错。建议把这些字段改成按值生成的 formatter,或至少拆成 singular/plural 两套字段。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/locale/bg_BG.ts` around lines 15 - 18, Update the Bulgarian locale
entries in the locale object so time unit labels are not fixed plural nouns,
since TimeColumn builds aria labels like “${value} ${locale.hours}” and will
read singular values incorrectly. Adjust the locale shape used by TimeColumn to
provide value-aware formatters or separate singular/plural fields for hours,
minutes, seconds, and milliseconds, then wire the TimePanel/TimeColumn consumers
to use those symbols instead of static strings.

Comment thread src/locale/lt_LT.ts
Comment on lines +15 to +18
hours: 'Valandos',
minutes: 'Minutės',
seconds: 'Sekundės',
milliseconds: 'Milisekundės',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

单个静态单位词不足以生成正确的立陶宛语 aria-label。

TimeColumn.tsx 会直接拼接 ${value} ${locale.hours}。这里的 Valandos/Minutės/Sekundės/Milisekundės 是固定形式,结果会读出 1 Valandos1 Minutės 这类不自然的标签。这个 PR 的无障碍改动在 lt_LT 下会因此退化,建议把 Locale/TimeColumn 合约改成可按数值生成标签,而不是只提供一个静态单位字符串。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/locale/lt_LT.ts` around lines 15 - 18, `TimeColumn.tsx` currently builds
aria-labels by concatenating a numeric value with static unit strings from
`lt_LT`, which produces incorrect Lithuanian forms like `1 Valandos`. Update the
`TimeColumn`/locale contract so the label is generated from the full numeric
value, not a fixed unit token, and adjust `lt_LT` to provide a value-aware
formatter or singular/plural-aware unit labels for `hours`, `minutes`,
`seconds`, and `milliseconds`. Use the `TimeColumn` and `lt_LT` symbols to
locate the affected logic.

Comment thread src/locale/nb_NO.ts
Comment on lines +15 to +18
hours: 'Timer',
minutes: 'Minutter',
seconds: 'Sekunder',
milliseconds: 'Millisekunder',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

这些单位名会生成错误的 option aria-label

TimeColumn 现在会把数值直接拼到这些文案后面(见 src/PickerPanel/TimePanel/TimePanelBody/TimeColumn.tsx:34-66),所以这里会读成 1 Timer1 Minutter1 Sekunder。这不是仅靠翻译能修好的问题:Locale 合约目前只给了每个单位一个固定字符串,无法按数值做单复数/词形变化。建议把上游 contract 改成“按 value 生成单位文案”的格式化接口或模板,再统一回填各语言包。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/locale/nb_NO.ts` around lines 15 - 18, The fixed unit strings in the
locale contract are causing incorrect aria-labels when TimeColumn concatenates
numeric values with hours/minutes/seconds/milliseconds. Update the Locale API
used by TimeColumn and the locale files (including nb_NO) so unit labels are
generated from the value at runtime, rather than stored as a single static
string; refactor the relevant formatter/template shape in TimeColumn and its
locale consumers to support singular/plural or language-specific inflection.

Comment thread src/locale/pl_PL.ts
Comment on lines +15 to +18
hours: 'Godziny',
minutes: 'Minuty',
seconds: 'Sekundy',
milliseconds: 'Milisekundy',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

当前 contract 无法生成正确的波兰语时间读法。

src/PickerPanel/TimePanel/TimePanelBody/TimeColumn.tsx:34-66 会把数值直接与这些字段拼成 aria-label。以这里的值为例,实际会读出 1 Godziny1 Minuty 这类错误词形。这个问题已经超出 locale 文案本身了:需要把 Locale/getListItemLabel() 改成能按数值选择词形的 contract,而不是继续依赖单个复数字段。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/locale/pl_PL.ts` around lines 15 - 18, The current locale contract cannot
produce correct Polish time labels because TimeColumn builds aria-labels by
concatenating numbers with the plural-only strings from pl_PL. Update the Locale
contract and the getListItemLabel() path used by TimeColumn so the label can be
chosen based on the numeric value and return the correct Polish word form
instead of a single static field. Keep the fix centered around the locale
interface and the TimeColumn/getListItemLabel integration, rather than adjusting
only the pl_PL text values.

Comment on lines +51 to +63
function getListItemLabel(type: TimeUnitType, value: string | number, locale: Locale) {
switch (type) {
case 'hour':
return `${value} ${locale.hours}`;
case 'minute':
return `${value} ${locale.minutes}`;
case 'second':
return `${value} ${locale.seconds}`;
case 'millisecond':
return `${value} ${locale.milliseconds}`;
case 'meridiem':
return value.toString();
default:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

当前 item aria-label 的生成方式会把时间项读错。

这里把数值统一拼成 ${value} ${locale.xxx}en_US 下会读出 1 Hours,很多语言也需要更复杂的复数规则;meridiem 分支还直接返回 am/pm,会覆盖 TimePanelBody 里已经本地化的 label。建议把 item label 改成 locale formatter/模板,至少让 meridiem 复用当前 unit.label

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/PickerPanel/TimePanel/TimePanelBody/TimeColumn.tsx` around lines 51 - 63,
The aria-label generation in TimeColumn’s getListItemLabel is too naive: it
concatenates raw values with locale unit names, which breaks pluralization and
can misread meridiem items. Update the TimeColumn item label logic to use the
locale’s formatter/template or existing localized unit label instead of
hardcoding `${value} ${locale.xxx}`; in particular, make the meridiem branch
reuse the already localized label passed from TimePanelBody rather than
returning the raw value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant