CentreForDigitalHumanities / CentreForDigitalHumanities/Textcavator

PEACE portal: modal autofocus scrolls the page awkwardly

Open
#1,944 1 comment 0 reactions 0 assignees View on GitHub
bug frontend
Dominant language
Python
Stars
12
Forks
3
Avg merge
3d 3m
Merged PRs (30d)
9

Description

When you open a document modal on PEACE portal, the page scrolls to the bottom of the modal (at least on Firefox), which is kind of jarring and impractical.

I think this happens because an element at the bottom receives autofocus. The scrolling only happens with the embedded view on PEACE portal, because the height of the iframe may be higher than the view height of the browser window (it is on a typical desktop monitor). Thus scrolling is necessary.

Suggested solutions:

- Autofocus on the modal title instead of the first interactive element (which is in the footer). Both are valid, accessibility-wise, but the scrolling behaviour will make more sense if you scroll to the top of the modal.
- The `` has `style="height: 1330px;"`. Change to `style="height: 100vh;"`.

I think either of these would fix the problem but I would do both.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.