Skip to content

Support react-native-platform-touchable in accessible-touchable #6

@jevakallio

Description

@jevakallio

The react-native-platform-touchable component is a commonly used interface for platform Touchable* primitives.

The suggested usage from their docs is:

import Touchable from 'react-native-platform-touchable';

The tricky bit is that since this is a default import, people can call the variable whatever they want, e.g. "PlatformTouchable".

Three alternative solutions to this:

  • Strict: Covers components called just "Touchable". Relies on convention.
  • Loose: Cover any component that includes the string Touchable in their name. Relies on semantics.
  • Options: Add an array of additional names as an option to the style. Future-proof, as people can then also add completely different names, e.g. "Smooshable" (or whatever). Relies on people reading the docs, and is slightly more work intensive.

I'm leaning on the combination first and last option: Include "Touchable" by default, and add an extensibility options.

In either case, this is a low-priority enhancement.

@knitcodemonkey thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions