diff --git a/playground/app.tsx b/playground/app.tsx
index de24280..bd11158 100644
--- a/playground/app.tsx
+++ b/playground/app.tsx
@@ -18,6 +18,7 @@ export default () => {
day: 1
}}
onSelect={onSelect}
+ localization="zh-CN"
/>
)
diff --git a/src/components/SingleDatePicker.tsx b/src/components/SingleDatePicker.tsx
index 2c30f0a..cb97e0a 100644
--- a/src/components/SingleDatePicker.tsx
+++ b/src/components/SingleDatePicker.tsx
@@ -83,37 +83,45 @@ export default ({ value, onSelect, localization }: Props) => {
+ }} aria-label={`Go to last year, ${currentYear - 1}, you are now at year ${currentYear}`}>
setCurrentYear(parseInt(e.target.value))}
+ aria-label="Year input, type a year to go to that year"
/>
+ }} aria-label={`Go to next year, ${currentYear + 1}, you are now at year ${currentYear}`}>
{Array.from({ length: 12 }).map((_, index) => )}
)
else return (
-
-
{l10nDays.map((day, index) =>
{day}
)}
- {dates.map(date => selectDate(date)}>
+ {dates.map(date => selectDate(date)}
+ aria-label={`${date.toLocaleString(localization || navigator.language, { dateStyle: 'full' })}${date.toDateString() === new Date().toDateString() ? ", this is today" : ""}, click to select this date`}
+ tabIndex={currentMonth !== date.getMonth() ? -1 : 0 }
+ aria-hidden={currentMonth !== date.getMonth()}
+ >
{date.getDate()}
{date.toDateString() === new Date().toDateString() && }
)}