CP A11Y steals focus from interactions and interaction dialog

Description

Acceptance Criteria

1. CP does not steal the focus when clicking a button or another tabbable element.
2. CP does not steal the focus when an interaction dialog is open.
3. Not possible to navigate CP while inside an interaction's dialog.
4. Do not steal focus while selecting text

Background

Currently, as long as the clicked element isn't one of <input>, <textarea >or <a> it will steal the focus. This causes trouble when interaction dialogs are open and you're trying to select text and the focus is moved to the wrapper and you start navigating the presentation while the interaction is open and you're selecting text.
This is also troublesome for accessibility.
People with poor precision or vision use their keyboards to help select the text they want, stealing the focus and navigating to another slide while selecting text is not good for accessibility.

Tip

Search for that.$wrapper.focus(); in cp,js to find the code.
Adding a 'button' check, a tabindex check and a check for the dialog to the if statement should do the trick,

Environment

None

Acceptance Criteria

None

Assignee

Pål Jørgensen

Reporter

Frode Petterson

Funding

None

Code reviewer

Frode Petterson

Released

None

Time tracking

6h

Fix versions

Sprint

None

Affects versions

Priority

Medium
Configure