Skip to content

Previous button is accessible via keyboard when it's disabled #888

@RobertWilliamsCymro

Description

@RobertWilliamsCymro

UV version:
[email protected]
I'm submitting a:
[ x] bug report

Current behaviour:

At the moment, a keyboard user can use the previous button in the header panel even if it's disabled via CSS. When the button is clicked, it will produce an error:

image

The position placemaker will also go off the screen when the previous button is clicked enough times:

image

Expected behavior:

The button should be disabled for all users.

Steps to reproduce:
Use the tab key to get to the previous button in the header panel, and when the page no is 1 or less, press the enter key. The error will then appear.

Other information:

It might be better to use Javascript to disable the button, adding something like below into PagingHeaderPanel.ts would do the trick.

In the disablePrevButton method, add:
this.$prevButton.attr("disabled","disabled");

and in enablePrevButtion, remove the attribute:

this.$prevButton.removeAttr("disabled");

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions