Skip to content

Commit

Permalink
fix(MWPW-142926):video modal does not close when esc button is presse…
Browse files Browse the repository at this point in the history
…d. (#1925)

* close dialog modal which contains only video on pressing esc

* focus is set to close button insdie a video modal

* fixed single qoute linting error

* removed || false

* hidden anchors should not be a part of the focusable elements

* Update modal.js

---------

Co-authored-by: Robert Bogos <146744221+robert-bogos@users.noreply.github.com>
Co-authored-by: Blaine Gunn <Blainegunn@gmail.com>
  • Loading branch information
3 people authored Apr 11, 2024
1 parent 902b03d commit 2a81d84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/blocks/modal/modal.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable import/no-cycle */
import { createTag, getMetadata, localizeLink, loadStyle, getConfig } from '../../utils/utils.js';

const FOCUSABLES = 'a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]';
const FOCUSABLES = 'a:not(.hide-video), button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]';
const CLOSE_ICON = `<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
<g transform="translate(-10500 3403)">
<circle cx="10" cy="10" r="10" transform="translate(10500 -3403)" fill="#707070"/>
Expand Down

0 comments on commit 2a81d84

Please sign in to comment.