Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

[terra-dropdown-button] Voice Over Focus does not go inside when opening with mouse. #2772

Closed
saket2403 opened this issue Dec 4, 2019 · 2 comments

Comments

@saket2403
Copy link
Contributor

saket2403 commented Dec 4, 2019

Bug Report

Description

Needs investigation for page jump issue which we found out in form-select issue #2682. Since
Terra-dropdown-button also uses terra-hookshot to render dropdown-list. we need to test terra-dropdown-button with IFrame.

@saket2403 saket2403 self-assigned this Dec 4, 2019
@saket2403 saket2403 changed the title [terra-dropdown-button]Voice Over Focus does not go inside due when opening with mouse. [terra-dropdown-button]Voice Over Focus does not go inside when opening with mouse. Dec 4, 2019
@saket2403 saket2403 assigned supreethmr and unassigned saket2403 Dec 5, 2019
@ryanthemanuel ryanthemanuel added this to the Backlog milestone Dec 5, 2019
@supreethmr
Copy link
Contributor

supreethmr commented Dec 13, 2019

The Voice Over Focus moves around in the page before going inside the dropdown. This was introduced due to the changes in PR #2766 , where the focus was moved out of the dropdown when opening it with a mouse click.
This is due to the Portal in Hookshot which is rendered into a DOM node that exists outside the DOM hierarchy of the parent component.

this issue has been addressed with PR : #2766

the page jump issue what we found in this component when rendered inside iframe

page jump issue seems to be not happening with dropdown button.

Added Iframe for DefaultDropdownButton.jsx in DisabledDropdownButton.test.jsx to re-create page jump Issue ( page scrolling to top on dropdown open ). the page scroll that is happening on dropdown open is expected scroll movement that keeps the active option at visible position on screen all the time.

As identified in terra-form-select page jump was happening due to setting focus to dropdown div on open. In case of terra-dropdown-button we will be setting focus to first item in list not to the dropdown div. this causes page to scroll to active item instead of scrolling to dropdown div (hookshot).

DisabledDropdownButton.test.jsx : ( Dropdown button with Iframe )
dropdown-button-focus-1

DefaultValueZero.test.jsx : ( Form-select with Iframe )
form-select-focus-1

As seen in the above image page jump was not hiding selected item from visible viewport like terra-form-select where page was scrolled to top by ignoring opened dropdown div.

Since page is not hiding selected item of dropdown on open, So we may not require any code changes in dropdown button for Iframe scenario(page jump issue) like terra-form-select.

For reference I have created branch to re-create this issue of page jump on open.
Test examples : DisabledDropdownButton and DefaultValueZero can be used to re-create the above mentioned scenarios.

@StephenEsser StephenEsser changed the title [terra-dropdown-button]Voice Over Focus does not go inside when opening with mouse. [terra-dropdown-button] Voice Over Focus does not go inside when opening with mouse. Dec 19, 2019
@supreethmr
Copy link
Contributor

page jump issue mentioned in issue description was not reproducible in terra-dropdown button closing this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants