mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
A11y: Make list type picker display tooltip on hover (#68798)
* Change ariaLabel to description * Description fallback for aria-label * Add ariaLabel ass fallback for description
This commit is contained in:
@@ -55,10 +55,10 @@ export const RadioButton = React.forwardRef<HTMLInputElement, RadioButtonProps>(
|
||||
id={id}
|
||||
checked={active}
|
||||
name={name}
|
||||
aria-label={ariaLabel}
|
||||
aria-label={ariaLabel || description}
|
||||
ref={ref}
|
||||
/>
|
||||
<label className={styles.radioLabel} htmlFor={id} title={description}>
|
||||
<label className={styles.radioLabel} htmlFor={id} title={description || ariaLabel}>
|
||||
{children}
|
||||
</label>
|
||||
</>
|
||||
|
||||
@@ -12,8 +12,12 @@ import { SearchLayout, SearchState } from '../../types';
|
||||
|
||||
function getLayoutOptions() {
|
||||
return [
|
||||
{ value: SearchLayout.Folders, icon: 'folder', ariaLabel: t('search.actions.view-as-folders', 'View by folders') },
|
||||
{ value: SearchLayout.List, icon: 'list-ul', ariaLabel: t('search.actions.view-as-list', 'View as list') },
|
||||
{
|
||||
value: SearchLayout.Folders,
|
||||
icon: 'folder',
|
||||
description: t('search.actions.view-as-folders', 'View by folders'),
|
||||
},
|
||||
{ value: SearchLayout.List, icon: 'list-ul', description: t('search.actions.view-as-list', 'View as list') },
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user