mirror of
https://github.com/grafana/grafana.git
synced 2024-12-28 01:41:24 -06:00
enable jsx-a11y/no-autofocus (#56288)
This commit is contained in:
parent
80dfa788c6
commit
e942a3d99d
@ -101,7 +101,12 @@
|
||||
"jsx-a11y/media-has-caption": "error",
|
||||
"jsx-a11y/mouse-events-have-key-events": "off",
|
||||
"jsx-a11y/no-access-key": "error",
|
||||
"jsx-a11y/no-autofocus": "off",
|
||||
"jsx-a11y/no-autofocus": [
|
||||
"error",
|
||||
{
|
||||
"ignoreNonDOM": true
|
||||
}
|
||||
],
|
||||
"jsx-a11y/no-distracting-elements": "error",
|
||||
"jsx-a11y/no-interactive-element-to-noninteractive-role": "error",
|
||||
"jsx-a11y/no-noninteractive-element-interactions": [
|
||||
|
@ -74,6 +74,8 @@ export function SegmentInput<T>({
|
||||
<input
|
||||
{...rest}
|
||||
ref={ref}
|
||||
// this needs to autofocus, but it's ok as it's only rendered by choice
|
||||
// eslint-disable-next-line jsx-a11y/no-autofocus
|
||||
autoFocus
|
||||
className={cx(`gf-form gf-form-input`, inputWidthStyle)}
|
||||
value={value}
|
||||
|
@ -41,7 +41,6 @@ export function DashboardSearch({}: Props) {
|
||||
onKeyDown={onKeyDown}
|
||||
spellCheck={false}
|
||||
className={styles.input}
|
||||
autoFocus
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
@ -70,7 +70,6 @@ export function DashboardSearchModal({ isOpen }: Props) {
|
||||
tabIndex={0}
|
||||
spellCheck={false}
|
||||
className={styles.input}
|
||||
autoFocus
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user