adobe / spectrum-web-components

Spectrum Web Components
https://opensource.adobe.com/spectrum-web-components/
Apache License 2.0
1.21k stars 192 forks source link

chore(progress-bar): handles focus and keyboard input #4516

Closed Rajdeepc closed 1 month ago

Rajdeepc commented 1 month ago

Description

Updated tabindex=0 on firstUpdated lifecycle to attach a tab stop to the element so that it can be picked up by the screen readers.

Related issue(s)

-

Motivation and context

How has this been tested?

Screenshots (if appropriate)

Screenshot 2024-05-29 at 4 17 39β€―PM

Types of changes

Checklist

Best practices

This repository uses conventional commit syntax for each commit message; note that the GitHub UI does not use this by default so be cautious when accepting suggested changes. Avoid the "Update branch" button on the pull request and opt instead for rebasing your branch against main.

github-actions[bot] commented 1 month ago

Branch preview

Visual regression test results When a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs: - [High Contrast Mode | Medium | LTR](https://e54910e30ce7a3cc5e323a68884a406a--spectrum-web-components.netlify.app/review/) - [Spectrum | Lightest | Medium | LTR](https://1ad911186ae713a821363e1cbab1f325--spectrum-web-components.netlify.app/review/) - [Spectrum | Lightest | Medium | RTL](https://f5773718182936ee01d520a564c5e84c--spectrum-web-components.netlify.app/review/) - [Spectrum | Lightest | Large | LTR](https://2db0e689e40fa3794508f6c1a1b3cfbb--spectrum-web-components.netlify.app/review/) - [Spectrum | Lightest | Large | RTL](https://9b7f57187d5053fb6bcd871c80e4bc33--spectrum-web-components.netlify.app/review/) - [Spectrum | Light | Medium | LTR](https://18b671e6d2168a9912b2f3536a7844e4--spectrum-web-components.netlify.app/review/) - [Spectrum | Light | Medium | RTL](https://a963e7039faec8391673b4e94502700f--spectrum-web-components.netlify.app/review/) - [Spectrum | Light | Large | LTR](https://12206a3616968af1bdf717656418718b--spectrum-web-components.netlify.app/review/) - [Spectrum | Light | Large | RTL](https://a51d0c90b289f1ceed06ce5f3602e57d--spectrum-web-components.netlify.app/review/) - [Spectrum | Dark | Medium | LTR](https://a46d93b3bfebb91ffef5cdd3dbcd1e99--spectrum-web-components.netlify.app/review/) - [Spectrum | Dark | Medium | RTL](https://c49c7cb07e4b329f4bee2e7971b9e81f--spectrum-web-components.netlify.app/review/) - [Spectrum | Dark | Large | LTR](https://2fd614af6249763a7f57048a7b6dc18d--spectrum-web-components.netlify.app/review/) - [Spectrum | Dark | Large | RTL](https://9e4826ed56bfdba85009c0ff13176204--spectrum-web-components.netlify.app/review/) - [Spectrum | Darkest | Medium | LTR](https://15dd43bf28750ed86e5866e156b54a29--spectrum-web-components.netlify.app/review/) - [Spectrum | Darkest | Medium | RTL](https://28f86d2cc52b04c6364fbc767b14058c--spectrum-web-components.netlify.app/review/) - [Spectrum | Darkest | Large | LTR](https://51084279c1c12fd7a18736c407284d37--spectrum-web-components.netlify.app/review/) - [Spectrum | Darkest | Large | RTL](https://0e8dab9a4d34848f475f211c8e29efc1--spectrum-web-components.netlify.app/review/) - [Express | Lightest | Medium | LTR](https://07414efb9f45d7fded80aada9bcd91e4--spectrum-web-components.netlify.app/review/) - [Express | Lightest | Medium | RTL](https://c727177a04057ab8ede2ef6717e9cd0f--spectrum-web-components.netlify.app/review/) - [Express | Lightest | Large | LTR](https://f0d4ab804c9b39d19893657073d7dcbf--spectrum-web-components.netlify.app/review/) - [Express | Lightest | Large | RTL](https://ca43160d8d226f5b7ec9782cf0f57be4--spectrum-web-components.netlify.app/review/) - [Express | Light | Medium | LTR](https://57c4a2b23acf0b8294f617b314166bb6--spectrum-web-components.netlify.app/review/) - [Express | Light | Medium | RTL](https://64a2dc201ae95ae7c6f0d82b78c3f136--spectrum-web-components.netlify.app/review/) - [Express | Light | Large | LTR](https://21d64f539f8f1ab076578ae988df761d--spectrum-web-components.netlify.app/review/) - [Express | Light | Large | RTL](https://10bd2429628674bd8fd38340f94ddb32--spectrum-web-components.netlify.app/review/) - [Express | Dark | Medium | LTR](https://d63844ef1f92565e1779327ed7a27dd3--spectrum-web-components.netlify.app/review/) - [Express | Dark | Medium | RTL](https://a7940fccabec9eb92e20623b1abecd9b--spectrum-web-components.netlify.app/review/) - [Express | Dark | Large | LTR](https://95bba9b2d20923351575bfbb6825d9f4--spectrum-web-components.netlify.app/review/) - [Express | Dark | Large | RTL](https://42d58c9f76f1ea9bd8b86d4fa30e55ab--spectrum-web-components.netlify.app/review/) - [Express | Darkest | Medium | LTR](https://170ec3ffcd4f4134bdc9a65ebfdbd63b--spectrum-web-components.netlify.app/review/) - [Express | Darkest | Medium | RTL](https://b74c6bf0762449d4eae239ddc981a22a--spectrum-web-components.netlify.app/review/) - [Express | Darkest | Large | LTR](https://9030bebb1000df76fdfdde2368446d7e--spectrum-web-components.netlify.app/review/) - [Express | Darkest | Large | RTL](https://d62388d12af6ba00ae4c9f10c683acfb--spectrum-web-components.netlify.app/review/) - [Spectrum-two | Light | Medium | LTR](https://6ab0bc425808b77416d2dc8e52ca3a38--spectrum-web-components.netlify.app/review/) - [Spectrum-two | Light | Medium | RTL](https://8ccba7ae6e7191f862a80728c478d16b--spectrum-web-components.netlify.app/review/) - [Spectrum-two | Light | Large | LTR](https://4e0d5a030af938faf101115fd0585984--spectrum-web-components.netlify.app/review/) - [Spectrum-two | Light | Large | RTL](https://137fe0bae7d7ab634b99eaff9bc6d467--spectrum-web-components.netlify.app/review/) - [Spectrum-two | Dark | Medium | LTR](https://541ace3feab95ce650a868c5163708a1--spectrum-web-components.netlify.app/review/) - [Spectrum-two | Dark | Medium | RTL](https://2ff326eb9d2e71a927bb66b2b20622e5--spectrum-web-components.netlify.app/review/) - [Spectrum-two | Dark | Large | LTR](https://d47df532d46a2b4e0313c59e3f368def--spectrum-web-components.netlify.app/review/) - [Spectrum-two | Dark | Large | RTL](https://bf021fb201afffb7521281bdf358580e--spectrum-web-components.netlify.app/review/)
github-actions[bot] commented 1 month ago

Lighthouse scores

Category Latest (report) Main (report) Branch (report)
Performance 0.99 0.99 0.99
Accessibility 1 1 1
Best Practices 1 1 1
SEO 1 0.92 0.92
PWA 1 1 1
What is this? [Lighthouse](https://github.com/GoogleChrome/lighthouse) scores comparing the documentation site built from the PR ("Branch") to that of the production documentation site ("Latest") and the build currently on main ("Main"). Higher scores are better, but *note that the SEO scores on Netlify URLs are artifically constrained to 0.92.*

Transfer Size

Category Latest Main Branch
Total 222.121 kB 210.954 kB 210.847 kB πŸ†
Scripts 54.10 kB 48.583 kB 48.473 kB πŸ†
Stylesheet 35.028 kB 30.48 kB 30.478 kB πŸ†
Document 5.977 kB 5.259 kB 5.255 kB πŸ†
Font 127.016 kB 126.632 kB πŸ† 126.641 kB

Request Count

Category Latest Main Branch
Total 45 45 45
Scripts 37 37 37
Stylesheet 5 5 5
Document 1 1 1
Font 2 2 2
github-actions[bot] commented 1 month ago

Tachometer results

Chrome ## progress-bar [_permalink_](#user-content-progress-bar) ### basic-test | Version | Bytes | Avg Time | vs remote | vs branch | |---|---|---|---|---| | npm latest | 407 kB | 29.91ms - 31.03ms | - | faster βœ”
0% - 5%
0.09ms - 1.58ms | | branch | 395 kB | 30.82ms - 31.80ms | slower ❌
0% - 5%
0.09ms - 1.58ms | - |
Firefox ## progress-bar [_permalink_](#user-content-progress-bar) ### basic-test | Version | Bytes | Avg Time | vs remote | vs branch | |---|---|---|---|---| | npm latest | 407 kB | 62.40ms - 66.28ms | - | unsure πŸ”
-7% - +1%
-4.87ms - +0.67ms | | branch | 395 kB | 64.46ms - 68.42ms | unsure πŸ”
-1% - +8%
-0.67ms - +4.87ms | - |
blunteshwar commented 1 month ago

Can you also add a relevant test for this.

blunteshwar commented 1 month ago

I noticed that some sections of this PR are not fully completed. Could you please fill out all the necessary details and ensure that everything is properly documented?

nikkimk commented 1 month ago

What would be the use case to make a progressbar focusable given that progressbars are not interactive, and that aria-busy and aria-live are better ways to communicate updates to the element?

Rajdeepc commented 1 month ago

Closing this since aria-live should take care of this! https://www.magentaa11y.com/checklist-web/progress/