-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Vis: Default editor] EUIficate coordinate map (tile map) options tab #42517
[Vis: Default editor] EUIficate coordinate map (tile map) options tab #42517
Conversation
Pinging @elastic/kibana-app |
💔 Build Failed |
6c25782
to
c6e6336
Compare
💚 Build Succeeded |
src/legacy/core_plugins/tile_map/public/components/wms_interna_options.tsx
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/tile_map/public/components/wms_interna_options.tsx
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/tile_map/public/components/wms_interna_options.tsx
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/tile_map/public/components/wms_interna_options.tsx
Outdated
Show resolved
Hide resolved
<EuiSpacer size="s" /> | ||
|
||
<TextInputOption | ||
label={<FormattedMessage id="tileMap.wmsOptions.wmsUrlLabel" defaultMessage="WMS url*" />} |
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.
We need to try to make these "footnotes" accessible. I'm thinking that you'll want to do some form of:
<label>WMS url <sup aria-describedby="wmsInternalOptionsFootnote">*</sup></label>
<p id="wmsInternalOptionsFootnote">*If this parameter is incorrect, maps will fail to load.</p>
Or maybe @myasonik has some ideas as well.
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.
aria-label
, aria-labelledby
and aria-describedby
generally don't work on non-interactive and/or non-widget role elements.
I tested adding role=tooltip
to various elements but that's not well supported... (though that's probably the answer I wish I could give)
So I think the best recommendation I can give is to add this text to the help text of the inputs so it's read as part of the description of the input.
To clean up the reading, I'd also hide the asterisk and the final footnote from screen readers with aria-hidden=true
.
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.
Just a small note to add, also just noticed that we could pass in describedByIds
which would similarly work to add more description text to the input but, after testing it with Daniil, we decided against it.
Using describedByIds
puts the repeated footnote first and the unique help text second but a user is likely to navigate away from the input before it's done reading if it sounds like we're reading the same text over and over again.
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.
Thanks @myasonik for your help!
The PR updated with suggested changes
src/legacy/core_plugins/tile_map/public/components/wms_interna_options.tsx
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/tile_map/public/components/wms_interna_options.tsx
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/tile_map/public/components/wms_interna_options.tsx
Outdated
Show resolved
Hide resolved
💚 Build Succeeded |
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.
Code LGTM, but please resolve comments below.
src/legacy/core_plugins/tile_map/public/components/wms_internal_options.tsx
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/tile_map/public/components/wms_internal_options.tsx
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/tile_map/public/components/wms_internal_options.tsx
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/tile_map/public/components/wms_internal_options.tsx
Outdated
Show resolved
Hide resolved
export interface InjectedDependencies { | ||
[key: string]: any; | ||
} | ||
export interface VisOptionsProps extends InjectedDependencies { |
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.
I wouldn't extend VisOptionsProps
itself because it will influence other components (Pie
, Tag cloud
) allowing to pass almost any addition props. Instead of this let's create a separate interface for tile and region maps (e.g. VisMapOptionsProps
) which will extend VisOptionsProps
interface and have serviceSettings
property additionally.
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.
Nice catch! Done!
src/legacy/core_plugins/tile_map/public/components/wms_internal_options.tsx
Outdated
Show resolved
Hide resolved
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.
LGTM, with just one extra suggestion.
💚 Build Succeeded |
💚 Build Succeeded |
…elastic#42517) * EUIficate tile_map_vis_options * Add basic options * Get rid of vislib_basic_options * Move wms_options directive to region_map * Get rid if TileMapVisParams directive * Update region_map namespaces * Support of injecting of any dependency
Summary
A part of #38273.
EUIfication of the
Options
tab in theCoordinate map
vis.This includes:
RangeOption
component;TextInputOption
component;withInjectedDependencies
as HOC to pass dependencies from angular injector asserviceSettings
toOptions
;WmsOptions
andWmsInternalOptions
components;vislibBasicOptions
directive;Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.For maintainers