A11y: Make tabs in query history + inspector accessible in Explore (#53773)

* refactor: make tabs accesible

* refactor: make content after slider accessible

* refactor: add a comment with todo
This commit is contained in:
Laura Benz 2022-08-18 17:16:37 +02:00 committed by GitHub
parent 4a9137ac40
commit f5f93ccd96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -47,6 +47,8 @@ export const RangeSlider: FunctionComponent<RangeSliderProps> = ({
onAfterChange={onAfterChange}
vertical={!isHorizontal}
reverse={reverse}
// TODO: The following is a temporary work around for making content after the slider accessible and it will be removed when fixing the slider in public/app/features/explore/RichHistory/RichHistoryQueriesTab.tsx.
tabIndex={[0, 1]}
/>
</div>
);

View File

@ -42,7 +42,8 @@ export const Tab = React.forwardRef<HTMLAnchorElement, TabProps>(
return (
<div className={tabsStyles.item}>
<a
href={href}
// in case there is no href '#' is set in order to maintain a11y
href={href ? href : '#'}
className={linkClass}
{...otherProps}
onClick={onChangeTab}