Skip to content
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

Combo box icon accessibility #876

Merged
merged 5 commits into from
May 25, 2018
Merged
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- Added FF/IE fallback for `.eui-textBreakWord` ([#864](https://github.com/elastic/eui/pull/864))
- Fixed `EuiCard` description text color when used in/as an anchor tag ([#864](https://github.com/elastic/eui/pull/864))
- Fixed `EuiCard` IE bugs ([#864](https://github.com/elastic/eui/pull/864))
- Fixed button labeling for `EuiFormControlLayout` and `EuiComboBox` accessibility ([#876](https://github.com/elastic/eui/pull/876))

## [`0.0.49`](https://github.com/elastic/eui/tree/v0.0.49)

Expand Down
3 changes: 2 additions & 1 deletion src/components/combo_box/combo_box_input/combo_box_input.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export class EuiComboBoxInput extends Component {
const removeOptionMessageContent =
`Combo box. Selected. ` +
(searchValue ? `${searchValue}. Selected. ` : '') +
(selectedOptions.length ? `${value}. Unselected. Press Backspace to delete ${selectedOptions[selectedOptions.length - 1].label}. ` : '') +
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cjcenizal I couldn't see a usage for the "unselected" bit? re: #785

(selectedOptions.length ? `${value}. Press Backspace to delete ${selectedOptions[selectedOptions.length - 1].label}. ` : '') +
`You are currently on a combo box. Type text or, to display a list of choices, press Down Arrow. ` +
`To exit the list of choices, press Escape.`;

Expand Down Expand Up @@ -161,6 +161,7 @@ export class EuiComboBoxInput extends Component {
side: 'right',
onClick: isListOpen && !isDisabled ? onCloseListClick : onOpenListClick,
ref: toggleButtonRef,
'aria-label': isListOpen ? 'Close list of options' : 'Open list of options',
};

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ exports[`EuiFormControlLayout props clear onClick is rendered 1`] = `
class="euiFormControlLayout__icons euiFormControlLayout__icons--right"
>
<button
aria-label="Clear selections"
class="euiFormControlLayout__clear customClass"
data-test-subj="clearButton"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@
vertical-align: baseline;
}

svg {
margin-top: -$euiSizeXS;
}

&:focus {
background: $euiColorPrimary;
border-radius: 100%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ export class EuiFormControlLayout extends Component {
<button
className={clearClasses}
onClick={onClearClick}
aria-label="Clear selections"
{...clearRest}
>
<EuiIcon
Expand Down