Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MOO-809]: Implement a11y for pluggable widgets #21

Open
wants to merge 26 commits into
base: main
Choose a base branch
from

Conversation

UrazAkgultan
Copy link
Collaborator

Checklist

  • Contains unit tests ✅
  • Contains breaking changes ❌
  • Compatible with: MX 9️⃣
  • Did you update version and changelog? ✅
  • PR title properly formatted ([XX-000]: description)? ✅
  • Works in Android ❔
  • Works in iOS ✅
  • Works in Tablet ✅

Feature specific

  • Comply with designs ✅
  • Comply with PM's requirements ✅

This PR contains

  • Bug fix
  • Feature
  • Refactor
  • Documentation
  • Other (describe)

What is the purpose of this PR?

Implement a11y for pluggable widgets.

@UrazAkgultan UrazAkgultan added the enhancement New feature or request label Jan 3, 2023
@UrazAkgultan UrazAkgultan self-assigned this Jan 3, 2023
@moo-team moo-team added the Widget label Jan 3, 2023
@UrazAkgultan UrazAkgultan marked this pull request as ready for review January 23, 2023 22:17
@UrazAkgultan UrazAkgultan requested a review from a team as a code owner January 23, 2023 22:17
return visible ? (
<View style={style.container}>
<Pressable
style={[style.header.container, icon === "left" && { flexDirection: "row-reverse" }]}
onPress={collapsible ? () => onPressGroupHeader(group, index) : null}
accessible={isAccessible}
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure if this is the right place to configure if the element is accessible or not, as if the accordion element is open by default then the children will be accessible still.

(group.headerRenderMode === "text" ? group.headerText.value : undefined)
}
accessibilityHint={group.screenReaderHint?.value}
accessibilityState={{ expanded: isExpanded }}
Copy link
Contributor

Choose a reason for hiding this comment

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

you can use accessibilityElementsHidden and importantForAccessibility properties to disable all the children if the parent is disabled

@@ -41,11 +48,12 @@ export function GroupIcon({ iconCollapsed, iconExpanded, isExpanded, style }: Gr
}, [isExpanded, animatedValue]);

return customIconsConfigured ? (
<View style={iconStyles}>
<View accessible={accessible} style={iconStyles}>
Copy link
Contributor

Choose a reason for hiding this comment

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

it would be nice if there is a caption for the icon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Widget
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants