diff options
Diffstat (limited to 'src/settings')
-rw-r--r-- | src/settings/components/form/BlacklistForm.tsx | 3 | ||||
-rw-r--r-- | src/settings/components/form/PartialBlacklistForm.tsx | 8 | ||||
-rw-r--r-- | src/settings/components/form/SearchForm.tsx | 10 |
3 files changed, 17 insertions, 4 deletions
diff --git a/src/settings/components/form/BlacklistForm.tsx b/src/settings/components/form/BlacklistForm.tsx index d301f2c..6fb9eca 100644 --- a/src/settings/components/form/BlacklistForm.tsx +++ b/src/settings/components/form/BlacklistForm.tsx @@ -52,6 +52,7 @@ class BlacklistForm extends React.Component<Props> { data-index={index} type="text" name="url" + aria-label="URL" value={item.pattern} placeholder="example.com/mail/*" onChange={this.bindValue.bind(this)} @@ -64,6 +65,7 @@ class BlacklistForm extends React.Component<Props> { name="delete" onClick={this.bindValue.bind(this)} onBlur={this.props.onBlur} + aria-label="Delete" /> </GridCell> </GridRow> @@ -72,6 +74,7 @@ class BlacklistForm extends React.Component<Props> { </Grid> <AddButton name="add" + aria-label="Add" style={{ float: "right" }} onClick={this.bindValue.bind(this)} /> diff --git a/src/settings/components/form/PartialBlacklistForm.tsx b/src/settings/components/form/PartialBlacklistForm.tsx index dcdd00c..b2da2bb 100644 --- a/src/settings/components/form/PartialBlacklistForm.tsx +++ b/src/settings/components/form/PartialBlacklistForm.tsx @@ -52,7 +52,7 @@ class PartialBlacklistForm extends React.Component<Props> { render() { return ( <> - <Grid> + <Grid role="list"> <GridHeader> <GridCell>URL</GridCell> <GridCell>Keys</GridCell> @@ -62,12 +62,13 @@ class PartialBlacklistForm extends React.Component<Props> { return null; } return ( - <GridRow key={index}> + <GridRow key={index} role="listitem"> <GridCell> <Input data-index={index} type="text" name="url" + aria-label="URL" value={item.pattern} placeholder="example.com/mail/*" onChange={this.bindValue.bind(this)} @@ -79,6 +80,7 @@ class PartialBlacklistForm extends React.Component<Props> { data-index={index} type="text" name="keys" + aria-label="Keys" value={item.keys.join(",")} placeholder="j,k,<C-d>,<C-u>" onChange={this.bindValue.bind(this)} @@ -89,6 +91,7 @@ class PartialBlacklistForm extends React.Component<Props> { <DeleteButton data-index={index} name="delete" + aria-label="Delete" onClick={this.bindValue.bind(this)} onBlur={this.props.onBlur} /> @@ -99,6 +102,7 @@ class PartialBlacklistForm extends React.Component<Props> { </Grid> <AddButton name="add" + aria-label="Add" style={{ float: "right" }} onClick={this.bindValue.bind(this)} /> diff --git a/src/settings/components/form/SearchForm.tsx b/src/settings/components/form/SearchForm.tsx index cc7061a..4bf0e02 100644 --- a/src/settings/components/form/SearchForm.tsx +++ b/src/settings/components/form/SearchForm.tsx @@ -54,7 +54,7 @@ class SearchForm extends React.Component<Props> { const value = this.props.value.toJSON(); return ( <> - <Grid> + <Grid role="list"> <GridHeader> <GridCell>Name</GridCell> <GridCell>URL</GridCell> @@ -62,12 +62,13 @@ class SearchForm extends React.Component<Props> { </GridHeader> {value.engines.map((engine, index) => { return ( - <GridRow key={index}> + <GridRow key={index} role="listitem"> <GridCell> <Input data-index={index} type="text" name="name" + aria-label="Name" value={engine[0]} onChange={this.bindValue.bind(this)} onBlur={this.props.onBlur} @@ -78,6 +79,7 @@ class SearchForm extends React.Component<Props> { data-index={index} type="text" name="url" + aria-label="URL" placeholder="http://example.com/?q={}" value={engine[1]} onChange={this.bindValue.bind(this)} @@ -89,11 +91,14 @@ class SearchForm extends React.Component<Props> { data-index={index} type="radio" name="default" + aria-label="Default" checked={value.default === engine[0]} onChange={this.bindValue.bind(this)} /> + a <DeleteButton data-index={index} + aria-label="Delete" name="delete" onClick={this.bindValue.bind(this)} /> @@ -104,6 +109,7 @@ class SearchForm extends React.Component<Props> { </Grid> <AddButton name="add" + aria-label="Add" style={{ float: "right" }} onClick={this.bindValue.bind(this)} /> |