grafana/public/app/features/datasources
Adam Simpson c57924e332
A11y: Fix remaining focus issues with Switch (#48376)
* refactor: replace uses of checked prop for <Switch> with value prop

* fix: remove spaces from ids

The ID format is stated as follows([source][1]):

> ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]),
hyphens ("-"), underscores ("_"), colons (":"), and periods (".").

Since `QueryHeaderSwitch` is used in two places I created a new variable that replaces spaces with a dash in the label.

[1]: https://www.w3.org/TR/html401/types.html#type-name

* fix: allow Switch in AlertingSettings to be focused by keyboard

* fix: allow Switch in PromSettings to be focused by keyboard

Fixes #46472

Co-authored-by: Elfo404 <me@giordanoricci.com>
2022-05-02 13:50:44 +00:00
..
__mocks__ DataSource: show the uid in edit url, not the local id (#33818) 2021-05-08 18:13:26 +02:00
__snapshots__ AccessControl: add one-dimensional permissions to datasources (#38070) 2021-09-01 15:18:17 +02:00
settings A11y: Fix remaining focus issues with Switch (#48376) 2022-05-02 13:50:44 +00:00
state Chore: ESlint import order (#44959) 2022-04-22 14:33:13 +01:00
utils Update dependency prettier to v2.5.1 (#43473) 2022-02-02 12:02:32 +00:00
DashboardsTable.test.tsx Chore: ESlint import order (#44959) 2022-04-22 14:33:13 +01:00
DashboardsTable.tsx Chore: ESlint import order (#44959) 2022-04-22 14:33:13 +01:00
DataSourceDashboards.test.tsx Chore: ESlint import order (#44959) 2022-04-22 14:33:13 +01:00
DataSourceDashboards.tsx Chore: ESlint import order (#44959) 2022-04-22 14:33:13 +01:00
DataSourceList.test.tsx Chore: ESlint import order (#44959) 2022-04-22 14:33:13 +01:00
DataSourcesList.tsx Chore: ESlint import order (#44959) 2022-04-22 14:33:13 +01:00
DataSourcesListPage.test.tsx Chore: ESlint import order (#44959) 2022-04-22 14:33:13 +01:00
DataSourcesListPage.tsx Chore: ESlint import order (#44959) 2022-04-22 14:33:13 +01:00
mocks.ts DataSource: show the uid in edit url, not the local id (#33818) 2021-05-08 18:13:26 +02:00
NewDataSourcePage.tsx Chore: ESlint import order (#44959) 2022-04-22 14:33:13 +01:00