-
Notifications
You must be signed in to change notification settings - Fork 106
fix: moved public focus method to private. #1851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: moved public focus method to private. #1851
Conversation
|
| return item.shadowRoot?.querySelector(`.pfe-dropdown-item__container`) ?? null; | ||
| } | ||
|
|
||
| // move focus to the button |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // move focus to the button | |
| /** Move focus back to the button after closing the dropdown */ |
|
|
||
| // move focus to the button | ||
| private _focus():void { | ||
| this.shadowRoot?.querySelector<HTMLButtonElement>('#pfe-dropdown-toggle')?.focus(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| this.shadowRoot?.querySelector<HTMLButtonElement>('#pfe-dropdown-toggle')?.focus(); | |
| this.button?.focus(); |
fix(dropdown): compose UI events test(dropdown): e2e tests test(dropdown): fix types in e2e tests style(dropdown): lint test(dropdown): e2e tests with page object model test(dropdown): build demo with optional shadowroot docs(dropdown): rearrange docs urls docs(dropdown): inline docs docs(dropdown): refactor docs page docs(dropdown): add changeset docs(dropdown): update inline docs chore: updated docs for download items feat: switched to options in docs. Added public expanded property. Updated tests fix: prev next keyboard actions for items fixed keyboard navigation. added tests to cover a11y tests added better tests, weeded out race conditions chore: fix types fix: add guard for item clicks chore: update types style(dropdown): whitespace changes fix(dropdown): remove extra focus() method fix(dropdown): use focus-within in item fix(dropdown): moved public focus method to private. (#1851) test(dropdown): pick nits in dropdown tests Co-Authored-By: Michael Potter <[email protected]>
fix(dropdown): compose UI events test(dropdown): e2e tests test(dropdown): fix types in e2e tests style(dropdown): lint test(dropdown): e2e tests with page object model test(dropdown): build demo with optional shadowroot docs(dropdown): rearrange docs urls docs(dropdown): inline docs docs(dropdown): refactor docs page docs(dropdown): add changeset docs(dropdown): update inline docs chore: updated docs for download items feat: switched to options in docs. Added public expanded property. Updated tests fix: prev next keyboard actions for items fixed keyboard navigation. added tests to cover a11y tests added better tests, weeded out race conditions chore: fix types fix: add guard for item clicks chore: update types style(dropdown): whitespace changes fix(dropdown): remove extra focus() method fix(dropdown): use focus-within in item fix(dropdown): moved public focus method to private. (#1851) test(dropdown): pick nits in dropdown tests Co-Authored-By: Michael Potter <[email protected]> fix(dropdown): add {{version}} to element classes docs(dropdown): use pfe-styles Co-Authored-By: Steven Spriggs <[email protected]> feat(dropdown): add CSS shadow parts
**Features** - switched to options in docs. Added public expanded property. Updated tests - add CSS shadow parts **Fixes** - compose UI events - rename `pfeEvent` to `deprecatedCustomEvent` - remove extra focus() method - use focus-within in item - moved public focus method to private. (#1851) - add {{version}} to element classes - add guard for item clicks - prev next keyboard actions for items - fixed keyboard navigation. added tests to cover a11y tests - added better tests, weeded out race conditions **Tests** - e2e tests - fix types in e2e tests - e2e tests with page object model - build demo with optional shadowroot - pick nits in dropdown tests **Docs** - rearrange docs urls - inline docs - add changeset - use pfe-styles Co-Authored-By: Michael Potter <[email protected]> Co-Authored-By: Steven Spriggs <[email protected]>
**Features** - switched to options in docs. Added public expanded property. Updated tests - add CSS shadow parts **Fixes** - compose UI events - rename `pfeEvent` to `deprecatedCustomEvent` - remove extra focus() method - use focus-within in item - moved public focus method to private. (#1851) - add {{version}} to element classes - add guard for item clicks - prev next keyboard actions for items - fixed keyboard navigation. added tests to cover a11y tests - added better tests, weeded out race conditions **Tests** - e2e tests - fix types in e2e tests - e2e tests with page object model - build demo with optional shadowroot - pick nits in dropdown tests **Docs** - rearrange docs urls - inline docs - add changeset - use pfe-styles Co-Authored-By: Michael Potter <[email protected]> Co-Authored-By: Steven Spriggs <[email protected]>
**Features** - switched to options in docs. Added public expanded property. Updated tests - add CSS shadow parts **Fixes** - compose UI events - rename `pfeEvent` to `deprecatedCustomEvent` - remove extra focus() method - use focus-within in item - moved public focus method to private. (#1851) - add {{version}} to element classes - add guard for item clicks - prev next keyboard actions for items - fixed keyboard navigation. added tests to cover a11y tests - added better tests, weeded out race conditions **Tests** - e2e tests - fix types in e2e tests - e2e tests with page object model - build demo with optional shadowroot - pick nits in dropdown tests **Docs** - rearrange docs urls - inline docs - add changeset - use pfe-styles Co-Authored-By: Michael Potter <[email protected]> Co-Authored-By: Steven Spriggs <[email protected]>
**Features** - switched to options in docs. Added public expanded property. Updated tests - add CSS shadow parts **Fixes** - compose UI events - rename `pfeEvent` to `deprecatedCustomEvent` - remove extra focus() method - use focus-within in item - moved public focus method to private. (#1851) - add {{version}} to element classes - add guard for item clicks - prev next keyboard actions for items - fixed keyboard navigation. added tests to cover a11y tests - added better tests, weeded out race conditions **Tests** - e2e tests - fix types in e2e tests - e2e tests with page object model - build demo with optional shadowroot - pick nits in dropdown tests **Docs** - rearrange docs urls - inline docs - add changeset - use pfe-styles Co-Authored-By: Michael Potter <[email protected]> Co-Authored-By: Steven Spriggs <[email protected]>
**Features** - switched to options in docs. Added public expanded property. Updated tests - add CSS shadow parts **Fixes** - compose UI events - rename `pfeEvent` to `deprecatedCustomEvent` - remove extra focus() method - use focus-within in item - moved public focus method to private. (#1851) - add {{version}} to element classes - add guard for item clicks - prev next keyboard actions for items - fixed keyboard navigation. added tests to cover a11y tests - added better tests, weeded out race conditions **Tests** - e2e tests - fix types in e2e tests - e2e tests with page object model - build demo with optional shadowroot - pick nits in dropdown tests **Docs** - rearrange docs urls - inline docs - add changeset - use pfe-styles Co-Authored-By: Michael Potter <[email protected]> Co-Authored-By: Steven Spriggs <[email protected]>
**Features** - switched to options in docs. Added public expanded property. Updated tests - add CSS shadow parts **Fixes** - compose UI events - rename `pfeEvent` to `deprecatedCustomEvent` - remove extra focus() method - use focus-within in item - moved public focus method to private. (#1851) - add {{version}} to element classes - add guard for item clicks - prev next keyboard actions for items - fixed keyboard navigation. added tests to cover a11y tests - added better tests, weeded out race conditions **Tests** - e2e tests - fix types in e2e tests - e2e tests with page object model - build demo with optional shadowroot - pick nits in dropdown tests **Docs** - rearrange docs urls - inline docs - add changeset - use pfe-styles Co-Authored-By: Michael Potter <[email protected]> Co-Authored-By: Steven Spriggs <[email protected]>
**Features** - switched to options in docs. Added public expanded property. Updated tests - add CSS shadow parts **Fixes** - compose UI events - rename `pfeEvent` to `deprecatedCustomEvent` - remove extra focus() method - use focus-within in item - moved public focus method to private. (#1851) - add {{version}} to element classes - add guard for item clicks - prev next keyboard actions for items - fixed keyboard navigation. added tests to cover a11y tests - added better tests, weeded out race conditions **Tests** - e2e tests - fix types in e2e tests - e2e tests with page object model - build demo with optional shadowroot - pick nits in dropdown tests **Docs** - rearrange docs urls - inline docs - add changeset - use pfe-styles Co-Authored-By: Michael Potter <[email protected]> Co-Authored-By: Steven Spriggs <[email protected]>
**Features** - switched to options in docs. Added public expanded property. Updated tests - add CSS shadow parts **Fixes** - compose UI events - rename `pfeEvent` to `deprecatedCustomEvent` - remove extra focus() method - use focus-within in item - moved public focus method to private. (#1851) - add {{version}} to element classes - add guard for item clicks - prev next keyboard actions for items - fixed keyboard navigation. added tests to cover a11y tests - added better tests, weeded out race conditions **Tests** - e2e tests - fix types in e2e tests - e2e tests with page object model - build demo with optional shadowroot - pick nits in dropdown tests **Docs** - rearrange docs urls - inline docs - add changeset - use pfe-styles Co-Authored-By: Michael Potter <[email protected]> Co-Authored-By: Steven Spriggs <[email protected]>
**Features** - switched to options in docs. Added public expanded property. Updated tests - add CSS shadow parts **Fixes** - compose UI events - rename `pfeEvent` to `deprecatedCustomEvent` - remove extra focus() method - use focus-within in item - moved public focus method to private. (#1851) - add {{version}} to element classes - add guard for item clicks - prev next keyboard actions for items - fixed keyboard navigation. added tests to cover a11y tests - added better tests, weeded out race conditions **Tests** - e2e tests - fix types in e2e tests - e2e tests with page object model - build demo with optional shadowroot - pick nits in dropdown tests **Docs** - rearrange docs urls - inline docs - add changeset - use pfe-styles Co-Authored-By: Michael Potter <[email protected]> Co-Authored-By: Steven Spriggs <[email protected]>
**Features** - switched to options in docs. Added public expanded property. Updated tests - add CSS shadow parts **Fixes** - compose UI events - rename `pfeEvent` to `deprecatedCustomEvent` - remove extra focus() method - use focus-within in item - moved public focus method to private. (#1851) - add {{version}} to element classes - add guard for item clicks - prev next keyboard actions for items - fixed keyboard navigation. added tests to cover a11y tests - added better tests, weeded out race conditions **Tests** - e2e tests - fix types in e2e tests - e2e tests with page object model - build demo with optional shadowroot - pick nits in dropdown tests **Docs** - rearrange docs urls - inline docs - add changeset - use pfe-styles Co-Authored-By: Michael Potter <[email protected]> Co-Authored-By: Steven Spriggs <[email protected]>
**Features** - switched to options in docs. Added public expanded property. Updated tests - add CSS shadow parts **Fixes** - compose UI events - rename `pfeEvent` to `deprecatedCustomEvent` - remove extra focus() method - use focus-within in item - moved public focus method to private. (#1851) - add {{version}} to element classes - add guard for item clicks - prev next keyboard actions for items - fixed keyboard navigation. added tests to cover a11y tests - added better tests, weeded out race conditions **Tests** - e2e tests - fix types in e2e tests - e2e tests with page object model - build demo with optional shadowroot - pick nits in dropdown tests **Docs** - rearrange docs urls - inline docs - add changeset - use pfe-styles Co-Authored-By: Michael Potter <[email protected]> Co-Authored-By: Steven Spriggs <[email protected]>
**Features** - switched to options in docs. Added public expanded property. Updated tests - add CSS shadow parts **Fixes** - compose UI events - rename `pfeEvent` to `deprecatedCustomEvent` - remove extra focus() method - use focus-within in item - moved public focus method to private. (#1851) - add {{version}} to element classes - add guard for item clicks - prev next keyboard actions for items - fixed keyboard navigation. added tests to cover a11y tests - added better tests, weeded out race conditions **Tests** - e2e tests - fix types in e2e tests - e2e tests with page object model - build demo with optional shadowroot - pick nits in dropdown tests **Docs** - rearrange docs urls - inline docs - add changeset - use pfe-styles Co-Authored-By: Michael Potter <[email protected]> Co-Authored-By: Steven Spriggs <[email protected]>
**Features** - switched to options in docs. Added public expanded property. Updated tests - add CSS shadow parts **Fixes** - compose UI events - rename `pfeEvent` to `deprecatedCustomEvent` - remove extra focus() method - use focus-within in item - moved public focus method to private. (#1851) - add {{version}} to element classes - add guard for item clicks - prev next keyboard actions for items - fixed keyboard navigation. added tests to cover a11y tests - added better tests, weeded out race conditions **Tests** - e2e tests - fix types in e2e tests - e2e tests with page object model - build demo with optional shadowroot - pick nits in dropdown tests **Docs** - rearrange docs urls - inline docs - add changeset - use pfe-styles Co-Authored-By: Michael Potter <[email protected]> Co-Authored-By: Steven Spriggs <[email protected]>
**Features** - switched to options in docs. Added public expanded property. Updated tests - add CSS shadow parts **Fixes** - compose UI events - rename `pfeEvent` to `deprecatedCustomEvent` - remove extra focus() method - use focus-within in item - moved public focus method to private. (#1851) - add {{version}} to element classes - add guard for item clicks - prev next keyboard actions for items - fixed keyboard navigation. added tests to cover a11y tests - added better tests, weeded out race conditions **Tests** - e2e tests - fix types in e2e tests - e2e tests with page object model - build demo with optional shadowroot - pick nits in dropdown tests **Docs** - rearrange docs urls - inline docs - add changeset - use pfe-styles Co-Authored-By: Michael Potter <[email protected]> Co-Authored-By: Steven Spriggs <[email protected]>
**Features** - switched to options in docs. Added public expanded property. Updated tests - add CSS shadow parts **Fixes** - compose UI events - rename `pfeEvent` to `deprecatedCustomEvent` - remove extra focus() method - use focus-within in item - moved public focus method to private. (#1851) - add {{version}} to element classes - add guard for item clicks - prev next keyboard actions for items - fixed keyboard navigation. added tests to cover a11y tests - added better tests, weeded out race conditions **Tests** - e2e tests - fix types in e2e tests - e2e tests with page object model - build demo with optional shadowroot - pick nits in dropdown tests **Docs** - rearrange docs urls - inline docs - add changeset - use pfe-styles Co-Authored-By: Michael Potter <[email protected]> Co-Authored-By: Steven Spriggs <[email protected]>
**Features** - switched to options in docs. Added public expanded property. Updated tests - add CSS shadow parts **Fixes** - compose UI events - rename `pfeEvent` to `deprecatedCustomEvent` - remove extra focus() method - use focus-within in item - moved public focus method to private. (#1851) - add {{version}} to element classes - add guard for item clicks - prev next keyboard actions for items - fixed keyboard navigation. added tests to cover a11y tests - added better tests, weeded out race conditions **Tests** - e2e tests - fix types in e2e tests - e2e tests with page object model - build demo with optional shadowroot - pick nits in dropdown tests **Docs** - rearrange docs urls - inline docs - add changeset - use pfe-styles Co-Authored-By: Michael Potter <[email protected]> Co-Authored-By: Steven Spriggs <[email protected]>
**Features** - switched to options in docs. Added public expanded property. Updated tests - add CSS shadow parts **Fixes** - compose UI events - rename `pfeEvent` to `deprecatedCustomEvent` - remove extra focus() method - use focus-within in item - moved public focus method to private. (#1851) - add {{version}} to element classes - add guard for item clicks - prev next keyboard actions for items - fixed keyboard navigation. added tests to cover a11y tests - added better tests, weeded out race conditions **Tests** - e2e tests - fix types in e2e tests - e2e tests with page object model - build demo with optional shadowroot - pick nits in dropdown tests **Docs** - rearrange docs urls - inline docs - add changeset - use pfe-styles Co-Authored-By: Michael Potter <[email protected]> Co-Authored-By: Steven Spriggs <[email protected]>
**Features** - switched to options in docs. Added public expanded property. Updated tests - add CSS shadow parts **Fixes** - compose UI events - rename `pfeEvent` to `deprecatedCustomEvent` - remove extra focus() method - use focus-within in item - moved public focus method to private. (#1851) - add {{version}} to element classes - add guard for item clicks - prev next keyboard actions for items - fixed keyboard navigation. added tests to cover a11y tests - added better tests, weeded out race conditions **Tests** - e2e tests - fix types in e2e tests - e2e tests with page object model - build demo with optional shadowroot - pick nits in dropdown tests **Docs** - rearrange docs urls - inline docs - add changeset - use pfe-styles Co-Authored-By: Michael Potter <[email protected]> Co-Authored-By: Steven Spriggs <[email protected]>
Removing the public
focus()method causes an error in the following test:Enter should exit open dialog and move focus to the dropdown.. Meaning that when you're focused on the list item and you clickEnteron an action item it needs to programatically move the focus topfe-dropdown. Knowing that, I added a private_focus()method to programmatically move the focus to the button.