-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Makes the DateRangePicker and SingleDatePicker keyboard accessible
- Adds screen reader text to the input to describe how to enter the calendar - Adds arrow navigation to the calendar itself - Adds a keyboard shortcuts panel that pops up on top of the calendar - Adds screen reader text to each CalendarDay
- Loading branch information
Maja Wichrowska
committed
Apr 5, 2017
1 parent
5ba9930
commit 769f049
Showing
33 changed files
with
2,077 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,5 @@ module.exports = { | |
ANCHOR_RIGHT: 'right', | ||
|
||
DAY_SIZE: 39, | ||
BLOCKED_MODIFIER: 'blocked', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
.DayPickerKeyboardShortcuts__show, | ||
.DayPickerKeyboardShortcuts__close { | ||
background: none; | ||
border: 0; | ||
color: inherit; | ||
font: inherit; | ||
line-height: normal; | ||
overflow: visible; | ||
padding: 0; | ||
cursor: pointer; | ||
|
||
&:active { | ||
outline: none; | ||
} | ||
} | ||
|
||
.DayPickerKeyboardShortcuts__show { | ||
border-top: 26px solid $react-dates-color-white; | ||
border-right: 33px solid $react-dates-color-primary; | ||
width: 22px; | ||
position: absolute; | ||
right: 0; | ||
bottom: 0; | ||
|
||
&:hover { | ||
border-right: 33px solid #008489; | ||
} | ||
} | ||
|
||
.DayPickerKeyboardShortcuts__show_span { | ||
color: $react-dates-color-white; | ||
position: absolute; | ||
bottom: 0; | ||
right: -28px; | ||
} | ||
|
||
.DayPickerKeyboardShortcuts__panel { | ||
background: $react-dates-color-white; | ||
border: 1px solid $react-dates-color-border; | ||
border-radius: 2px; | ||
position: absolute; | ||
top: 0; | ||
bottom: 0; | ||
right: 0; | ||
left: 0; | ||
z-index: 2; | ||
padding: 22px; | ||
margin: 33px; | ||
} | ||
|
||
.DayPickerKeyboardShortcuts__title { | ||
font-size: 16px; | ||
font-weight: bold; | ||
margin: 0; | ||
} | ||
|
||
.DayPickerKeyboardShortcuts__list { | ||
list-style: none; | ||
padding: 0; | ||
|
||
} | ||
|
||
.DayPickerKeyboardShortcuts__close { | ||
position: absolute; | ||
right: 22px; | ||
top: 22px; | ||
z-index: 2; | ||
|
||
svg { | ||
height: 15px; | ||
width: 15px; | ||
fill: $react-dates-color-gray-lighter; | ||
|
||
&:hover, | ||
&:focus { | ||
fill: $react-dates-color-gray-light; | ||
} | ||
} | ||
|
||
&:active { | ||
outline: none; | ||
} | ||
} | ||
|
||
.KeyboardShortcutRow { | ||
margin: 6px 0; | ||
} | ||
|
||
.KeyboardShortcutRow__key-container { | ||
display: inline-block; | ||
width: 15%; | ||
text-align: right; | ||
margin-right: 6px; | ||
} | ||
|
||
.KeyboardShortcutRow__key { | ||
font-family: monospace; | ||
font-size: 12px; | ||
text-transform: uppercase; | ||
background: $react-dates-color-gray-lightest; | ||
padding: 2px 6px; | ||
} | ||
|
||
.KeyboardShortcutRow__action { | ||
display: inline-block; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.