Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

docs(ListItem): isSelected sets aria-current, not aria-selected (#8090)

Christopher Chedeaud8d8fdeff7da
diff --git a/.changeset/list-item-aria-current-doc.md b/.changeset/list-item-aria-current-doc.md
new file mode 100644
index 0000000000..f655556c3b
--- /dev/null
+++ b/.changeset/list-item-aria-current-doc.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/core': patch
+---
+
+[docs] `ListItem`'s documentation says what `isSelected` does: it marks the row as the current item with `aria-current="true"`. It used to say `aria-selected`, which a list item cannot carry and which the component has not set since 0.1.9.
+
+@vjeux
diff --git a/packages/core/src/List/ListItem.doc.mjs b/packages/core/src/List/ListItem.doc.mjs
index 60c5ff3f89..74b23fd4b9 100644
--- a/packages/core/src/List/ListItem.doc.mjs
+++ b/packages/core/src/List/ListItem.doc.mjs
@@ -104,7 +104,7 @@ export const docs = {
{
name: 'isSelected',
type: 'boolean',
- description: 'Selected state; sets aria-selected on the item.',
+ description: 'Selected state; marks the item as the current one with aria-current="true" (a list item cannot carry aria-selected).',
default: 'false',
},
{
@@ -196,7 +196,7 @@ export const docsZh = {
{
name: 'isSelected',
type: 'boolean',
- description: '选中状态;在项目上设置 aria-selected。',
+ description: '选中状态;在项目上设置 aria-current="true",将其标为当前项(列表项不能使用 aria-selected)。',
default: 'false',
},
{
@@ -236,6 +236,6 @@ export const docsDense = {
'Link target attribute, only when href provided. target="_blank" auto-adds noopener noreferrer.',
rel: 'Link relationship tokens. noopener noreferrer are merged for target="_blank".',
isDisabled: 'Disabled state; sets aria-disabled.',
- isSelected: 'Selected state; sets aria-selected.',
+ isSelected: 'Selected state; sets aria-current="true".',
},
};