-
Notifications
You must be signed in to change notification settings - Fork 1
Comparing changes
Open a pull request
base repository: renatodeleao/a11y-vue-dialog
base: v0.4.3
head repository: renatodeleao/a11y-vue-dialog
compare: master
Commits on May 1, 2020
-
fix: edge case of unwanted mouseup propagation
Fixes pseudo drags from dialog to backdrop closing the dialog. Pseudo becuase it's not a drag, it's a selection that can go out of bounds. Prevents mouseup that started inside (dialogRef mousedown) but was released outside (backdropRef) to bubble and also trigger backdrop click, consequentially closing the dialog.
⚠️ Note: for cases when backdropRef wraps the dialog content, so it's also our root, that's why it's affected by children events bubblingConfiguration menu - View commit details
-
Copy full SHA for f61af1a - Browse repository at this point
Copy the full SHA f61af1aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6ec53b9 - Browse repository at this point
Copy the full SHA 6ec53b9View commit details
Commits on May 5, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 352c63d - Browse repository at this point
Copy the full SHA 352c63dView commit details -
fix: remove complicated and not working cache mechanism on resetData
we we're caching anything, because on open the querySelector methods would run again anyways. So to this right we need to think about it more
Configuration menu - View commit details
-
Copy full SHA for a2e67a4 - Browse repository at this point
Copy the full SHA a2e67a4View commit details -
fix: listen to attribute changes on mutation observer
- otherwise v-show elements would be caught as new focusableChildren. - move getter under next-tick so that `v-if` elements can be caugh as well
Configuration menu - View commit details
-
Copy full SHA for 9a9d684 - Browse repository at this point
Copy the full SHA 9a9d684View commit details -
fix: our _isFocusable() definition to include only visible element
an invisible element (or inisde a hidden parent) is not focusable, so we need to remove those from the array. - Included jQuery :visible method definition, as it's smoother than computedStyles.
Configuration menu - View commit details
-
Copy full SHA for bec2b59 - Browse repository at this point
Copy the full SHA bec2b59View commit details -
fix: #21 handling focus mutations with conditionals
Some actions might trigger conditionals that change focus references within the dialog. Some could be added some removed. We were already updating those in the mutation observer (now updated with style changes as well for v-show), but if the focused element was removed itself focus was lost and the dialog could be closed with escape key. Among other problems this now moves focus to the next focusable element within the dialog or first it it doesn't exists. That guarantes that event if activeElement disappears, focus is kept trapped inside dialog. update: listen to focus to determine focuswed element in the focus tree this was done on trapFocus(), but it would only trigger the current if we actually tab our way there. If we click a button we didn't knew what was his position in current focusable tree. We now save it as instance property update: move focus to next element within the dialog if current disappears - after an async action the trigger might be removed or hidden, in both cases we move focus to the next element, it doesn't exist we go back to first. This fixes #21
Configuration menu - View commit details
-
Copy full SHA for a61be19 - Browse repository at this point
Copy the full SHA a61be19View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6a33e09 - Browse repository at this point
Copy the full SHA 6a33e09View commit details -
Configuration menu - View commit details
-
Copy full SHA for 360f974 - Browse repository at this point
Copy the full SHA 360f974View commit details -
Configuration menu - View commit details
-
Copy full SHA for dce7abb - Browse repository at this point
Copy the full SHA dce7abbView commit details
Commits on May 6, 2020
-
fix: proper focus management after dialog focusable mutations
I've worked super hard on this. It might look so simple but there's so many edges cases. I've written my best in comments, so rely on them for this commit description. TD;DR - this keeps focus trap (inside dialog) and sequential focus tabbing after an event that removes/disables current focused element moves focus to body. Note that this event can also mutate focus siblings, so quest for find the next/prev focusable element is not linear. Here's the more simplistic demo that we mimic: https://codepen.io/ohsimtabem/pen/QWjarqg But much more complex scenarios can happen (check the playground for wild examples)
Configuration menu - View commit details
-
Copy full SHA for bfade5b - Browse repository at this point
Copy the full SHA bfade5bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4abef9f - Browse repository at this point
Copy the full SHA 4abef9fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 24c43e3 - Browse repository at this point
Copy the full SHA 24c43e3View commit details
Commits on Jun 9, 2020
-
add: focus-visible polyfill as dev dependency
for debugging purposes.
Configuration menu - View commit details
-
Copy full SHA for 9b45d54 - Browse repository at this point
Copy the full SHA 9b45d54View commit details -
hotfix: focus-visibile trigger false positives on mutated active element
TL;DR for a brief moment focus-visible plugin sets document.activeElement to body(proably due to the blur() event on their codebase). that trigger our code to "think" that the active element was mutated — when hidden/removed focus moves to body. So we though that our tabbed element was deleted initiation that spaghetti of finding next, but since nothing was removed, focus visible set "next" to body, so our modal started from fist focus element again. Result we were always trapped in the same element. Solution is to wrap verification in an empty setTimout, that moves our code to the next queue, and in that place focus-visible has done its thing and active element is back to normal. This reveals the fragility of my focusTrap code. I know that is overengineered, but looking at other dialog/modal implementations it seems to me that either i'm not seeing something obvious, or nobody ecounters edge cases as frequent as me. closes #23. But #22 is desperately need 🆘
Configuration menu - View commit details
-
Copy full SHA for 214225b - Browse repository at this point
Copy the full SHA 214225bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4760274 - Browse repository at this point
Copy the full SHA 4760274View commit details
Commits on Jun 10, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 47b59f1 - Browse repository at this point
Copy the full SHA 47b59f1View commit details
Commits on Jul 17, 2020
-
build(deps): bump lodash from 4.17.15 to 4.17.19
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](lodash/lodash@4.17.15...4.17.19) Signed-off-by: dependabot[bot] <support@github.com>
Configuration menu - View commit details
-
Copy full SHA for fa13077 - Browse repository at this point
Copy the full SHA fa13077View commit details
Commits on Jul 31, 2020
-
build(deps): bump elliptic from 6.5.2 to 6.5.3
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.2 to 6.5.3. - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](indutny/elliptic@v6.5.2...v6.5.3) Signed-off-by: dependabot[bot] <support@github.com>
Configuration menu - View commit details
-
Copy full SHA for 122cc50 - Browse repository at this point
Copy the full SHA 122cc50View commit details
Commits on Aug 7, 2020
-
build(deps): bump prismjs from 1.20.0 to 1.21.0
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.20.0 to 1.21.0. - [Release notes](https://github.com/PrismJS/prism/releases) - [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md) - [Commits](PrismJS/prism@v1.20.0...v1.21.0) Signed-off-by: dependabot[bot] <support@github.com>
Configuration menu - View commit details
-
Copy full SHA for a4e973f - Browse repository at this point
Copy the full SHA a4e973fView commit details
Commits on Sep 4, 2020
-
build(deps-dev): bump node-sass from 4.13.0 to 4.13.1
Bumps [node-sass](https://github.com/sass/node-sass) from 4.13.0 to 4.13.1. - [Release notes](https://github.com/sass/node-sass/releases) - [Changelog](https://github.com/sass/node-sass/blob/master/CHANGELOG.md) - [Commits](sass/node-sass@v4.13.0...v4.13.1) Signed-off-by: dependabot[bot] <support@github.com>
Configuration menu - View commit details
-
Copy full SHA for bf9bbe8 - Browse repository at this point
Copy the full SHA bf9bbe8View commit details
Commits on Sep 30, 2020
-
fixup!: propper main field in package.json
This fixes issues when using the package in not transpile configured environments. I'll give jest as an example since it usually doesn't transpile node_modules due speed. Side-effect: - updates rollup config to not use pkg.main as entry point but a regular path instead.
Configuration menu - View commit details
-
Copy full SHA for 6d54cd5 - Browse repository at this point
Copy the full SHA 6d54cd5View commit details -
Merge pull request #25 from renatodeleao/dependabot/npm_and_yarn/loda…
…sh-4.17.19 build(deps): bump lodash from 4.17.15 to 4.17.19
Configuration menu - View commit details
-
Copy full SHA for 421b5e4 - Browse repository at this point
Copy the full SHA 421b5e4View commit details -
Merge pull request #26 from renatodeleao/dependabot/npm_and_yarn/elli…
…ptic-6.5.3 build(deps): bump elliptic from 6.5.2 to 6.5.3
Configuration menu - View commit details
-
Copy full SHA for 83cabc3 - Browse repository at this point
Copy the full SHA 83cabc3View commit details -
Merge pull request #27 from renatodeleao/dependabot/npm_and_yarn/pris…
…mjs-1.21.0 build(deps): bump prismjs from 1.20.0 to 1.21.0
Configuration menu - View commit details
-
Copy full SHA for 4f46825 - Browse repository at this point
Copy the full SHA 4f46825View commit details -
Merge pull request #28 from renatodeleao/dependabot/npm_and_yarn/node…
…-sass-4.13.1 build(deps-dev): bump node-sass from 4.13.0 to 4.13.1
Configuration menu - View commit details
-
Copy full SHA for 1dfbe86 - Browse repository at this point
Copy the full SHA 1dfbe86View commit details -
Configuration menu - View commit details
-
Copy full SHA for eba760d - Browse repository at this point
Copy the full SHA eba760dView commit details
Commits on Oct 5, 2020
-
refactor!: replaced internal focus management per focus-trap pkg
Because i'm just a regular guy with dyslexi, trying to do some frontend and there are way clever folks out there doing magic in the focus trap business! I had way too much heaches because of it, the code had so many hacks to make i barely work so and super glad to see them gone, special since focus-trap community seems vibrant! - Add focus-trap as dependency - Removed all code related with focus management - removed tests related with focus management
Configuration menu - View commit details
-
Copy full SHA for 1a49e12 - Browse repository at this point
Copy the full SHA 1a49e12View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9f54416 - Browse repository at this point
Copy the full SHA 9f54416View commit details -
Merge pull request #29 from renatodeleao/feat/focus-trap-next
Feat: focus trap next
Configuration menu - View commit details
-
Copy full SHA for 3b8c499 - Browse repository at this point
Copy the full SHA 3b8c499View commit details -
Configuration menu - View commit details
-
Copy full SHA for b2c8b61 - Browse repository at this point
Copy the full SHA b2c8b61View commit details
Commits on Oct 7, 2020
-
fix(focus-trap): only querySelector valid autofocus elements
avoids moving initial focus to invalid <div autofocus> which aren't focusable anyways. If people want invalid els to be focusable, they can pass it via focusRef (by binding it to an invalid element) or via focusTrapCreateOptions object, but by default we won't do it because it promotes a bad practice.
Configuration menu - View commit details
-
Copy full SHA for 70eb72e - Browse repository at this point
Copy the full SHA 70eb72eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6898e2e - Browse repository at this point
Copy the full SHA 6898e2eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7719aac - Browse repository at this point
Copy the full SHA 7719aacView commit details
Commits on Oct 18, 2020
-
fix: allow "role=alertdialog" to be closed on escape
This assumption was based on the description of https://github.com/edenspiekermann/a11y-dialog#usage-as-a-modal. But reading the spec, I don't find a reference to prevent alertdialog dismiss with the `Esc` key. Actually the aria example is dismissable by escape key https://www.w3.org/TR/wai-aria-practices-1.1/examples/dialog-modal/alertdialog.html That being said, the backdrop click is still prevented with the role "alertdialog" because the spec also says that "keyboard and mouse interactions only operate within the dialog." and currently our backdrop is outside the dialgoRoot element (although) it's not invalid to move it inside (never tested it) - so this requires further thought
Configuration menu - View commit details
-
Copy full SHA for 16d08f9 - Browse repository at this point
Copy the full SHA 16d08f9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1e3a3b5 - Browse repository at this point
Copy the full SHA 1e3a3b5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 19ce22e - Browse repository at this point
Copy the full SHA 19ce22eView commit details
Commits on Nov 30, 2020
-
feat: remove preventBackgroundScroll prop and side-effects
adding overflow hidden to body might sound a reasonable default but can actually break custom layouts that don't use body as their default scroller element. Also it's fairly known that iOS safari doesn't respond to overflow:hidden on body so a more powerful js solution is usually required. By these reasons i decided to deprecate this default implementation (which are just 3 lines that you can add to your custom wrapper anyways), and replaced it with event emits: that way you have full control over the preventBackgroundScroll solution. For now the method exposes siblingCount flag as play load to make sure the code does not ran in nested dialog scenario (since an overflow solution might already be applied), but keeping track of this could also be done at the wrapper level. I'll leave it for now since it's is just a children count of portal-target.
Configuration menu - View commit details
-
Copy full SHA for 0aa3a1f - Browse repository at this point
Copy the full SHA 0aa3a1fView commit details -
Configuration menu - View commit details
-
Copy full SHA for d120948 - Browse repository at this point
Copy the full SHA d120948View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4cfebc8 - Browse repository at this point
Copy the full SHA 4cfebc8View commit details -
docs: deprecation instructions of preventBackgroundScrolling
how to achieve the same thing using events.
Configuration menu - View commit details
-
Copy full SHA for fb6f28b - Browse repository at this point
Copy the full SHA fb6f28bView commit details -
Configuration menu - View commit details
-
Copy full SHA for edb7373 - Browse repository at this point
Copy the full SHA edb7373View commit details -
Configuration menu - View commit details
-
Copy full SHA for 423df2b - Browse repository at this point
Copy the full SHA 423df2bView commit details
Commits on Dec 11, 2020
-
build(deps): bump ini from 1.3.5 to 1.3.7
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7. - [Release notes](https://github.com/isaacs/ini/releases) - [Commits](npm/ini@v1.3.5...v1.3.7) Signed-off-by: dependabot[bot] <support@github.com>
Configuration menu - View commit details
-
Copy full SHA for 665d8f6 - Browse repository at this point
Copy the full SHA 665d8f6View commit details
Commits on Dec 14, 2020
-
Merge pull request #30 from renatodeleao/dependabot/npm_and_yarn/ini-…
…1.3.7 build(deps): bump ini from 1.3.5 to 1.3.7
Configuration menu - View commit details
-
Copy full SHA for 14b5f1a - Browse repository at this point
Copy the full SHA 14b5f1aView commit details
Commits on Mar 1, 2021
-
build(deps): bump prismjs from 1.21.0 to 1.23.0
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.21.0 to 1.23.0. - [Release notes](https://github.com/PrismJS/prism/releases) - [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md) - [Commits](PrismJS/prism@v1.21.0...v1.23.0) Signed-off-by: dependabot[bot] <support@github.com>
Configuration menu - View commit details
-
Copy full SHA for 288a9a5 - Browse repository at this point
Copy the full SHA 288a9a5View commit details
Commits on Mar 9, 2021
-
build(deps): bump elliptic from 6.5.3 to 6.5.4
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4. - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](indutny/elliptic@v6.5.3...v6.5.4) Signed-off-by: dependabot[bot] <support@github.com>
Configuration menu - View commit details
-
Copy full SHA for b9c15e2 - Browse repository at this point
Copy the full SHA b9c15e2View commit details
Commits on Mar 14, 2021
-
Merge pull request #32 from renatodeleao/dependabot/npm_and_yarn/elli…
…ptic-6.5.4 build(deps): bump elliptic from 6.5.3 to 6.5.4
Configuration menu - View commit details
-
Copy full SHA for e9709cf - Browse repository at this point
Copy the full SHA e9709cfView commit details -
Merge pull request #31 from renatodeleao/dependabot/npm_and_yarn/pris…
…mjs-1.23.0 build(deps): bump prismjs from 1.21.0 to 1.23.0
Configuration menu - View commit details
-
Copy full SHA for eb98a3d - Browse repository at this point
Copy the full SHA eb98a3dView commit details -
dev: you regular vue cli app for playground
removes breaking warnings and errors when using latest version of portal-vue. Also removes the need for colabs to have vue-cli installed globally and use the local version instead LinusBorg/portal-vue#201
Configuration menu - View commit details
-
Copy full SHA for 8636d3d - Browse repository at this point
Copy the full SHA 8636d3dView commit details
There are no files selected for viewing
Uh oh!
There was an error while loading. Please reload this page.