diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9952fc2..607aa1c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,8 +12,8 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 - name: Install dependencies - run: yarn + run: yarn install --frozen-lockfile - name: Install playwright browsers run: npx playwright install --with-deps - name: Run tests - run: npx playwright test \ No newline at end of file + run: ENV=CI npx playwright test \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 040179b..97b775e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 1.7.0 - 2025-11-07 + +- Remove non accessible keyboard shortcuts for Accordion component +- Add new boolean setting `closeOnBlur` for Dropdown component. If `true`, the expanded list will be closed on button blur. + ## 1.6.2 - 2024-12-17 - Add new event `onInit` option for Accordion component. diff --git a/examples/accessible-dropdown/README.md b/examples/accessible-dropdown/README.md index 8482196..1e4b6be 100644 --- a/examples/accessible-dropdown/README.md +++ b/examples/accessible-dropdown/README.md @@ -73,19 +73,20 @@ Dropdown.initFromPreset(); ### Options -| name | type | default | description | -|------------------------|---------------------------|--------------------|-------------------------------------------------| +| name | type | default | description | +|------------------------|---------------------------|--------------------|----------------------------------------------------------------------------------------------------------------| | `automaticSelection` | boolean \|\| string | `false` | if `true`, first item is automatically selected, if `string`, check if element exists and it will be selected. | -| `buttonSelector` | string | `button` | Button selector. | -| `labelSelector` | string | `.dropdown__label` | Label selector. | -| `listSelector` | string | `ul` | Listbox selector. | -| `mediaQuery` | null or matchMedia object | `null` | Set dropdown for a specific media query. | -| `nonSelectedItemLabel` | string | `No item selected` | Default button text if no items are selected. | -| `onChange` | null or function | `null` | Event on dropdown change. | -| `onClose` | null or function | `null` | Event on dropdown close. | -| `onListItemClick` | null or function | `null` | Event on dropdown list item click. | -| `onOpen` | null or function | `null` | Event on dropdown open. | -| `prefixId` | string | `dropdown` | Define the prefix id of the component. | +| `buttonSelector` | string | `button` | Button selector. | +| `closeOnBlur` | boolean | `false` | if `true`, the dropdown closes automatically when the button loses focus. | +| `labelSelector` | string | `.dropdown__label` | Label selector. | +| `listSelector` | string | `ul` | Listbox selector. | +| `mediaQuery` | null or matchMedia object | `null` | Set dropdown for a specific media query. | +| `nonSelectedItemLabel` | string | `No item selected` | Default button text if no items are selected. | +| `onChange` | null or function | `null` | Event on dropdown change. | +| `onClose` | null or function | `null` | Event on dropdown close. | +| `onListItemClick` | null or function | `null` | Event on dropdown list item click. | +| `onOpen` | null or function | `null` | Event on dropdown open. | +| `prefixId` | string | `dropdown` | Define the prefix id of the component. | ### Methods diff --git a/examples/accessible-dropdown/index.html b/examples/accessible-dropdown/index.html index 54aa8bc..d6b298f 100644 --- a/examples/accessible-dropdown/index.html +++ b/examples/accessible-dropdown/index.html @@ -10,15 +10,15 @@
See the Pen
Accessible Collapsible Dropdown Listbox by Be API (@beapi)
@@ -114,12 +128,12 @@ Code