diff --git a/apps/component-tests/src/components/showcase-test/showcase-test.tsx b/apps/component-tests/src/components/showcase-test/showcase-test.tsx index cf04ccc3b..1dd0b0901 100644 --- a/apps/component-tests/src/components/showcase-test/showcase-test.tsx +++ b/apps/component-tests/src/components/showcase-test/showcase-test.tsx @@ -22,7 +22,7 @@ export const ShowcaseTest = component$(() => { return ( <> -
+
{MetaGlobComponentSig.value && }
diff --git a/apps/website/src/_state/component-statuses.ts b/apps/website/src/_state/component-statuses.ts index 3ee90fb76..06a64f1cc 100644 --- a/apps/website/src/_state/component-statuses.ts +++ b/apps/website/src/_state/component-statuses.ts @@ -43,7 +43,7 @@ export const statusByComponent: ComponentKitsStatuses = { Modal: ComponentStatus.Beta, Pagination: ComponentStatus.Draft, Popover: ComponentStatus.Beta, - Progress: ComponentStatus.Draft, + Progress: ComponentStatus.Beta, Select: ComponentStatus.Beta, Separator: ComponentStatus.Beta, Tabs: ComponentStatus.Beta, diff --git a/apps/website/src/routes/docs/headless/progress/index.mdx b/apps/website/src/routes/docs/headless/progress/index.mdx index 76518c4f4..557a00d3a 100644 --- a/apps/website/src/routes/docs/headless/progress/index.mdx +++ b/apps/website/src/routes/docs/headless/progress/index.mdx @@ -10,78 +10,52 @@ import { Note } from '~/components/note/note'; # Progress -Displays a progress bar related to a task. +A visual indicator that shows how much of a task has been completed. -Qwik UI's Progress implementation follows the [WAI-Aria](https://www.w3.org/WAI/ARIA/apg/patterns/meter) design pattern, along with some additional API's that enhance the flexibility, types, and performance. +## ✨ Features - + ## Building blocks -{/* TODO: Match docs conventions with the select, collapsible, or label. */} - -## Accessibility - -Adheres to the [progressbar role requirements](https://www.w3.org/WAI/ARIA/apg/patterns/meter/). - -## API - -### Progress - -Contains all of the progress parts. +### 🎨 Anatomy - -### Progress Indicator +## Example CSS + + + +## API -Contains all of the progress parts. +### Progress.Root { - test(`should have root and indicator`, async ({ page }) => { +test.describe('Critical functionality', () => { + test(`GIVEN a progress + WHEN the progress is rendered + THEN it should have root and indicator`, async ({ page }) => { const { driver: d } = await setup(page, 'hero'); await expect(d.getRoot()).toBeVisible(); await expect(d.getProgressIndicator()).toBeVisible(); }); - test(`should have progress state loading if is not completed`, async ({ page }) => { + test(`GIVEN a progress + WHEN progress is not completed + THEN it should have progress state loading`, async ({ page }) => { const { driver: d } = await setup(page, 'hero'); - expect(d.getProgressIndicator()).toBeVisible(); + await expect(d.getProgressIndicator()).toBeVisible(); expect(await d.getProgressState()).toBe('loading'); expect(await d.getProgressValue()).toBe('30'); }); +}); - test(`should have aria attributes`, async ({ page }) => { +test.describe('A11y', () => { + test(`GIVEN a progress + WHEN the progress is rendered + THEN it should have aria-valuemin attribute`, async ({ page }) => { const { driver: d } = await setup(page, 'hero'); await expect(d.getRoot()).toHaveAttribute('aria-valuemin', '0'); + }); + + test(`GIVEN a progress + WHEN the progress is rendered + THEN it should have aria-valuemax attribute`, async ({ page }) => { + const { driver: d } = await setup(page, 'hero'); await expect(d.getRoot()).toHaveAttribute('aria-valuemax', '100'); + }); + + test(`GIVEN a progress + WHEN the progress is rendered + THEN it should have aria-valuenow attribute`, async ({ page }) => { + const { driver: d } = await setup(page, 'hero'); await expect(d.getRoot()).toHaveAttribute('aria-valuenow', '30'); + }); + + test(`GIVEN a progress + WHEN the progress is rendered + THEN it should have aria-valuetext attribute`, async ({ page }) => { + const { driver: d } = await setup(page, 'hero'); await expect(d.getRoot()).toHaveAttribute('aria-valuetext', '30%'); }); });