Accessibility and navigation between items

I am creating an accessible presentation and it is not working as I expected.
The Tab sequence of the items should be the title, the drawings, the paragraphs and in the end the navigation buttons.
The first scene works fine, even though some times it skips the title and starts with the drawing.
In the second scene the Tab key skips everything and goes directly to the buttons.
I copied the elements of the first scene to make the transition and made them aria-hidden.
Are they causing the problem?

Coronarias.zip (359.3 KB)

There’s a bracket error in the toggleFullScreen function, but that’s not the issue. The actual problem seems to be that the bounding box overlaps the text elements “Titulo”, “As coronarias”, and “Elas podem”, even though it is below those elements in the layer hierarchy. If you reduce the height of the bounding box from the bottom, it works for me.

CoronariasTeste.hype.zip (340.8 KB)

I reduced the height of the bottom element (Coracao group), but it did not make any difference.
Pressing Tab in the second scene still selects first the left navigation button, even though it has tab index 6, then the right button (tab index 7), and just then it starts over correctly, selecting the page address, the title (tab index 1), the images, the paragraphs and the buttons.
I changed the layer order of the elements to the order they should be selected, but it did not work either.

Ok, I did a Chat GPT request on this issue. The problems seems to be, that, if you change the scene, the tab order doesn´t necessarily start with '1' in the new scene. This little script should help. Just call it on SceneLoad in every scene. Works for me.

requestAnimationFrame(() => {

const firstElement =
    element.querySelector('[tabindex="1"]');

if (firstElement) {
    firstElement.focus({ preventScroll: true });
}

});

With this little CSS-Snippet in the head section you can define the look of the marker outlines:

<style>
.HYPE_scene \[tabindex\]:focus-visible {
    outline: 3px solid #0066cc !important;
    outline-offset: 2px;
}
</style>


Thank you very much for your help, Kalle.
I'm sorry but the 2nd scene is still strange.
When I move to it clicking on the button, the tab order is respected and the title is selected first, but when I select the button with Tab and press the spacebar to move to the 2nd scene, as a visually impaired person would do, the problem returns and the left button is selected.

Coronarias.zip (358.7 KB)

There are several issues in your file:

There are syntax errors in exitFullscreenWorks(), toggleFullScreen()and requestAnimationFrame()-> Have a closer look at your brackets...

You need to call requestAnimationFrame() in the On Scene Load action in both scenes.

…then it works for me, including pressing the spacebar when the “Next” button has focus.

CoronariasTeste_kt.hype.zip (340.3 KB)

Sorry for my silly mistake, I should have first checked the code.

Thanks!