From 3e7366aeefaa6d3a9ae529b5676a486ea9354a43 Mon Sep 17 00:00:00 2001 From: vagusX Date: Mon, 5 Aug 2024 15:57:03 +0800 Subject: [PATCH] feat: improve a11y (#242) --- src/index.tsx | 4 ++ tests/__snapshots__/index.test.tsx.snap | 90 +++++++++++++++++++++++++ 2 files changed, 94 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index 0bb2e73..05bbfb3 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -106,6 +106,8 @@ const InternalSegmentedOption: React.FC<{ className={classNames(className, { [`${prefixCls}-item-disabled`]: disabled, })} + role="option" + aria-selected={checked} > ( return (