Skip to content

Add limited support for focusgroup attribute#45

Closed
echo-vladimir wants to merge 2 commits intoai:mainfrom
echo-vladimir:focus-group
Closed

Add limited support for focusgroup attribute#45
echo-vladimir wants to merge 2 commits intoai:mainfrom
echo-vladimir:focus-group

Conversation

@echo-vladimir
Copy link
Contributor

No description provided.

function isHorizontalOrientation(group) {
let focusGroupValue = group.getAttribute('focusgroup')
if (focusGroupValue === 'inline') return true
if (focusGroupValue === 'block') return false
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is focusgroup has no inline or block? Some value should be by default?

Please, don’t rush. Read spec more careful and think twice and deeper.

if (group.role === 'toolbar') return getToolbarItems(group)
return group.querySelectorAll(`[role=${target.role}]`)
if (group.hasAttribute('focusgroup')) {
return [...group.children]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure, that all children should be focusable?

  1. What is some children is not focusable (like <h2>)?
  2. Can you double-check that we don't need similar logic to getToolbarItems?

@ai
Copy link
Owner

ai commented Oct 29, 2024

Sorry, this PR was faster #46

@ai ai closed this Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants