Awkward snapping when loading Game Map stages
Moodle 4.5.5 running latest synced h5p activities
We've observed an issue with game map activities.
On our game map has stages that appear longer than the game map itself (sets of large text areas and images, with occasional interactive elements). This sometimes appears normally, but frequently the view snaps down to elements within the page, such that rather than starting at the beginning, the user sees the middle of the activity. I thought this was due to the frame resizing but it acts inconsistently. On some activities it stays locked to the top. On some activities it snaps somewhere in the middle, on other activities it jumps to the end. No Rhyme or reason that I can see.
This happens across browsers.
otacke
Wed, 07/23/2025 - 14:54
Permalink
Hi!It would be tremendously
Hi!
It would be tremendously helpful if you shared a link to the content or to the content and/or a video of the issue. Otherwise, you're making reproducing the problem unnecessarily hard.
It sounds like a subcontent stealing focus, but I am not really looking forward to trying out all of them in a guessing manner in my spare time.
Best,
Oliver
SY3000
Thu, 08/21/2025 - 17:32
Permalink
file approved
I've gotten permission to share the file. For an example, click on the top right map element.
otacke
Thu, 08/21/2025 - 23:23
Permalink
Hi!That is fact caused by
Hi!
That is fact caused by following best practices for accessibility.
The overlay is a so called modal dialog, and after opening such a modal dialog, the first actionable element is supposed to receive focus. In your case, you have lots of text, then the images and then a link. The link is outside of the visible area, but it is the first actionable element, so it receives focus and is scrolled into view.
I am not sure if the workaround that I just implemented is the best solution, but I changed my code to immediately scroll back to the previous position after setting focus to the first actionable element. It should be fine for blind people this way and for people who can see, but visually impaired people who still see the screen but use a screenreader for support might be confused now as they may not be able to see what the screenreader announces.
Please note that I cannot update the version of GameMap on the H5P Hub - H5P Group needs to do that, and I can't tell when they are going to do so. There's already an open ticket to upgrade to 1.5.5 that I just updated to reflect the latest changes to 1.5.6, but don't ask me when they are going to handle this.
You can still get the 1.5.6 version of GameMap, but you need to dowload the demo content from https://www.olivertacke.de/labs/2023/03/02/heres-game-map-my-25th-h5p-content-type-thats-publicly-available/ and upload it to your platform while having administrative rights. That will install the latest version.
Best,
Oliver
otacke
Fri, 08/22/2025 - 12:27
Permalink
And, alas, while not optimal,
And, alas, while not optimal, there is a WCAG recommendation for that case that I now implemented. Hence: GameMap 1.5.7 is the latest version which also should not scroll down but still be nice to screenreaders in most cases.
SY3000
Wed, 08/27/2025 - 13:00
Permalink
Thanks very much for this -
Thanks very much for this - We're using the version thats pulled to moodle and we won't force upgrade it on our side, but knowing that a fix is in the pipeline along with the very useful explanation will help very much for our customer!