-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Lens] (Accessibility) Added focus state and accessible name to suggestions #84653
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
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 |
|---|---|---|
|
|
@@ -16,6 +16,7 @@ | |
| // Padding / negative margins to make room for overflow shadow | ||
| padding-left: $euiSizeXS; | ||
| margin-left: -$euiSizeXS; | ||
| padding-bottom: $euiSizeXS; | ||
| } | ||
|
|
||
| .lnsSuggestionPanel__button { | ||
|
|
@@ -27,13 +28,31 @@ | |
| margin-left: $euiSizeXS / 2; | ||
| margin-bottom: $euiSizeXS / 2; | ||
|
|
||
| &:focus { | ||
| @include euiFocusRing; | ||
| transform: none !important; // sass-lint:disable-line no-important | ||
| } | ||
|
|
||
| .lnsSuggestionPanel__expressionRenderer { | ||
| position: static; // Let the progress indicator position itself against the button | ||
| } | ||
| } | ||
|
|
||
| .lnsSuggestionPanel__button-isSelected { | ||
|
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. Please also add the following nested styles within this selector's ( |
||
| @include euiFocusRing; | ||
| background-color: $euiColorLightestShade !important; // sass-lint:disable-line no-important | ||
| border-color: $euiColorMediumShade; | ||
|
|
||
| &:not(:focus) { | ||
| box-shadow: none !important; // sass-lint:disable-line no-important | ||
| } | ||
|
|
||
| &:focus { | ||
| @include euiFocusRing; | ||
| } | ||
|
|
||
| &:hover { | ||
| transform: none !important; // sass-lint:disable-line no-important | ||
| } | ||
| } | ||
|
|
||
| .lnsSuggestionPanel__suggestionIcon { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -136,6 +136,8 @@ const SuggestionPreview = ({ | |
| paddingSize="none" | ||
| data-test-subj="lnsSuggestion" | ||
mbondyra marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| onClick={onSelect} | ||
| aria-current={!!selected} | ||
| aria-label={preview.title} | ||
| > | ||
| {preview.expression || preview.error ? ( | ||
| <PreviewRenderer | ||
|
|
@@ -356,7 +358,7 @@ export function SuggestionPanel({ | |
| visualizationMap[currentVisualizationId].getDescription(currentVisualizationState) | ||
| .icon || 'empty', | ||
| title: i18n.translate('xpack.lens.suggestions.currentVisLabel', { | ||
|
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. nit: Please remove the translations for this phrase |
||
| defaultMessage: 'Current', | ||
| defaultMessage: 'Current visualization', | ||
| }), | ||
| }} | ||
| ExpressionRenderer={AutoRefreshExpressionRenderer} | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
Please add a
border-color: $euiColorMediumShade;within this selector's (.lnsSuggestionPanel__button-isSelected) styles. I think this added contrast will help the selected button stand out just a bit more.