[Accessibility] fix: Set focus to form when applying filters#11397
[Accessibility] fix: Set focus to form when applying filters#11397abrahammordev wants to merge 1 commit intoILIAS-eLearning:release_10from
Conversation
|
Hi @abrahammordev, hi all, first of all, thank you @abrahammordev for your contribution and the effort you put into this. However, in my opinion, we should not accept this PR. Here is my reasoning:
Best regards, |
|
Hi @mjansenDatabay, Thank you very much for your review, I really appreciate it! I think a FR might be required here, as I would not want to add unnecessary complexity to the UI components themselves, and this seems to go beyond a pure a11y issue — it looks more like a general UI improvement. Many thanks, |
There was a problem hiding this comment.
Hi all,
I agree with @mjansenDatabay that we should not implement a fix local to every usage. The only place where this is be possible for now is the ilUIFilterService though (maybe in handleApplyAndToggle() as kind of hook), which should be used for most cases.
I think could implement a better solution and use a similar mechanism like for the data-table, in which a fixed ID for session storage can be provided and the UI framework does its thing. However, this would require effort which is better spent towards refactoring the filters as a whole (they suck). So my direction would be to try and apply the bandaid above.
IMO we can still treat this as an A11Y issue rather than a general UI improvement. I also think we do not need a FR or similar for this, as this is an implementation detail (a very intrusive one though).
Kind regards,
@thibsy (as UI coordinator)
Set focus to form when applying filters
When a user applies filters in the Mail folder view, the page reloads and focus is lost, forcing keyboard and screen reader users to navigate back to the filter area manually. This fix restores focus to the first interactive element in the filter section after the apply action.
Changes:
$focus_first_filter_input_after_applyflag toMailFilterUI, defaulting tofalseto preserve existing behaviour.ilMailFolderGUI::shouldFocusFirstFilterInputAfterApply()detects whether the current request was triggered by the filter's apply command (ilUIFilterService::CMD_APPLY) and passes the flag accordingly.No behavioural change occurs on regular page loads or other filter commands.
Related
https://mantis.ilias.de/view.php?id=32498