Skip to content

Commit dc2122e

Browse files
authored
fix: optional ARIA properties for role="separator" in useAriaPropsForRole (#3856)
1 parent 39a820e commit dc2122e

File tree

6 files changed

+85
-148
lines changed

6 files changed

+85
-148
lines changed

CHANGELOG.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b
133133

134134
- Fix edge case [#3791](https://github.com/biomejs/biome/issues/3791) for rule `noFocusedTests` being used with non-string-like expressions ([#3793](https://github.com/biomejs/biome/pull/3793)). Contributed by @h-a-n-a
135135

136+
- Fix optional ARIA properties for `role="separator"` in `useAriaPropsForRole` ([#3856](https://github.com/biomejs/biome/pull/3856)). Contributed by @anthonyshew
137+
136138
### Configuration
137139

138140
- Add support for loading configuration from `.editorconfig` files ([#1724](https://github.com/biomejs/biome/issues/1724)).
@@ -362,7 +364,7 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b
362364

363365
- [noConsole](https://biomejs.dev/linter/rules/no-console/) now accepts an option that specifies some allowed calls on `console`. Contributed by @Conaclos
364366

365-
- Add an `ignoreNull` option for [noDoubleEquals](https://biomejs.dev/linter/rules/no-double-equals/).
367+
- Add an `ignoreNull` option for [noDoubleEquals](https://biomejs.dev/linter/rules/no-double-equals/).
366368

367369
By default the rule allows loose comparisons against `null`.
368370
The option `ignoreNull` can be set to `false` for reporting loose comparison against `null`.
@@ -847,7 +849,7 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b
847849

848850
#### New features
849851

850-
- Add [noUnknownPseudoClass](https://biomejs.dev/linter/rules/no-unknown-pseudo-class/). Contributed by @tunamaguro
852+
- Add [noUnknownPseudoClass](https://biomejs.dev/linter/rules/no-unknown-pseudo-class/). Contributed by @tunamaguro
851853

852854
#### Bug fixes
853855

crates/biome_aria/src/roles.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,7 @@ define_role! {
152152
define_role! {
153153
/// https://www.w3.org/TR/wai-aria-1.1/#separator
154154
SeparatorRole {
155-
PROPS: [
156-
("aria-valuemax", true),
157-
("aria-valuemin", true),
158-
("aria-valuenow", true),
159-
],
155+
PROPS: [],
160156
ROLES: ["structure", "widget"],
161157
CONCEPTS: &[("hr", &[])],
162158
}

crates/biome_js_analyze/tests/specs/a11y/useAriaPropsForRole/invalid.jsx

+1-4
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ var a = <span role="spinbutton" aria-valuemin="0" aria-valuemax="100"></span>;
77
var a = <span role="slider" aria-valuemin="0"></span>;
88
var a = <span role="slider" aria-valuemax="100"></span>;
99
var a = <span role="slider" aria-valuemin="0" aria-valuemax="100"></span>;
10-
var a = <span role="separator" aria-valuemin="0"></span>;
11-
var a = <span role="separator" aria-valuemax="100"></span>;
12-
var a = <span role="separator" aria-valuemin="0" aria-valuemax="100"></span>;
1310
var a = <span role="scrollbar" aria-valuemin="0"></span>;
1411
var a = <span role="scrollbar" aria-valuemax="100"></span>;
1512
var a = <span role="scrollbar" aria-valuemin="0" aria-valuemax="100"></span>;
@@ -21,4 +18,4 @@ var a = <span role="combobox"></span>;
2118
var a = <span role="combobox" aria-expanded="true"></span>;
2219
var a = <span role="combobox" aria-controls="true"></span>;
2320
var a = <span role="menuitemcheckbox" ></span>;
24-
var a = <span role="menuitemradio" ></span>;
21+
var a = <span role="menuitemradio" ></span>;

0 commit comments

Comments
 (0)