diff --git a/README.md b/README.md index 7b8a42d..3fe1758 100644 --- a/README.md +++ b/README.md @@ -410,7 +410,31 @@ startKeyUX(window, [ focusGroupKeyUX() ]) ``` +### Focusgroup attribute +```html +
+ + + +
+``` + +```html +
+ + + +
+``` + +```html +
+ + + +
+``` ## Focus Jumps diff --git a/test/demo/index.html b/test/demo/index.html index 9c31218..2c527ef 100644 --- a/test/demo/index.html +++ b/test/demo/index.html @@ -131,13 +131,19 @@ border: 1px solid #aaa; padding: 0.5em 1em; background: #eee; - } - .focusgroup button:not(:last-child) { - margin-right: 1em; - } - .focusgroup[focusgroup='block'] button { - display: block; - margin-bottom: 1em; + + &[focusgroup='block'] button { + display: block; + margin-bottom: 1em; + } + + button { + background-color: white; + } + + button:not(:last-child) { + margin-right: 1em; + } } .toolbar { margin-top: 1em; diff --git a/test/demo/index.tsx b/test/demo/index.tsx index 582a94f..7516f2b 100644 --- a/test/demo/index.tsx +++ b/test/demo/index.tsx @@ -390,9 +390,9 @@ const FocusGroup: FC = () => { focusgroup={''} tabIndex={0} > - - - + + + ) @@ -407,9 +407,9 @@ const FocusGroupInline: FC = () => { focusgroup="inline" tabIndex={0} > - - - + + + ) @@ -424,9 +424,9 @@ const FocusGroupBlock: FC = () => { focusgroup="block" tabIndex={0} > - - - + + + )