Skip to content
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

Country selector search announces double the countries found to screen reader users #3648

Open
nchan0154 opened this issue Oct 14, 2024 · 0 comments

Comments

@nchan0154
Copy link

Describe the current behavior

  • Turn on a screen reader
  • Go to a country selector in the Dawn theme preview store
  • Type any query into the searchbox
  • The number of countries announced in the live region are doubled

Describe the expected behavior

  • The correct number of countries should be announced

Version information (Dawn, browsers and operating systems)

  • Dawn Version: 15.2.0
  • Chrome Version 129.0.6668.90
  • NVDA
  • Windows
  • Should be reproduceable on any OS/AT combo

Possible solution

Remove line 164 from localization-form.js

    allCountries.forEach((item) => {
      const countryName = this.normalizeString(item.querySelector('.country').textContent);
      if (countryName.indexOf(searchValue) > -1) {
        item.parentElement.classList.remove('hidden');
        visibleCountries++; // This line
      } else {
        item.parentElement.classList.add('hidden');
        visibleCountries--;
      }
    });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant