agentleFS
MicrosoftKnown publishermicrosoft/fluentui-react-native/packages/framework-base/src/accessibility/AGENTS.md

fluentui-react-native / accessibility

AGENTS.md1.4k starsChanged 6 months agoMITView on GitHub

Put universal, non-styling accessibility helpers in this directory. Keep component roles, state ownership, accessible-name policy, and activation callbacks in the owning component. Styling belongs in Design; native focus targets and keyboard coordination remain in the existing focus hooks. Extract only demonstrated shared behavior. Do not build a generic action registry, role framework, or speculative list of platform constants. Use resolveAccessibilityAction('toggle' | 'select', Platform.OS, callerActions) and use both results from the same resolution: The resolver is pure and declares actions; it…

Trending

Quiet since March.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 1 mentionMar 2026: 1 mentionApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the microsoft/fluentui-react-native repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about microsoft/fluentui-react-native

The biggest 5 of 24 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 24

Talked about on GitHub and Bluesky (24 times).

On GitHub · 23

18 more on GitHub

On Bluesky · 1

The file

We split this AGENTS.md into the rules it gives an agent

5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Put universal, non-styling accessibility helpers in this directory.

    line 3
  2. Distinctive:

    Read the component contract and source-check the installed renderer's action declaration, event name, invocation, and default activation …

    line 61
  3. Distinctive:

    Keep the generic package entrypoint React-only import-safe.

    line 64
  4. Very specific:

    Never eagerly import Platform or a native module through the generic index.

    line 67
  5. Distinctive:

    Keep disabled guards and controlled/uncontrolled or group state ownership in components.

    line 69

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Shared accessibility foundation

Put universal, non-styling accessibility helpers in this directory. Keep component roles, state ownership, accessible-name policy, and activation callbacks in the owning component. Styling belongs in Design; native focus targets and keyboard coordination remain in the existing focus hooks.

Extract only demonstrated shared behavior. Do not build a generic action registry, role framework, or speculative list of platform constants.

Semantic actions

Use resolveAccessibilityAction('toggle' | 'select', Platform.OS, callerActions) and use both results from the same resolution:

const action = resolveAccessibilityAction('toggle', Platform.OS, accessibilityActions);
// Assign action.accessibilityActions to the native root.
// Compare event.nativeEvent.actionName === action.name in its handler.

The resolver is pure and declares actions; it does not invoke a native service or guarantee that a platform's default assistive gesture invokes that action. Components may memoize the resolution against their caller action array. Constants alone are insufficient: declarations and event comparisons must agree, and duplicate declarations can produce duplicate native callbacks.

The current transport contract is:

PlatformToggleSelectEvidence and limits
Windows FabrictoggleselectRNW 0.81.35 CompositionDynamicAutomationProvider.cpp dispatches lowercase names. UiaHelpers.cpp::DispatchAccessibilityAction compares case-sensitively and emits once for every matching declaration.
Office Win32ToggleSelect@office-iss/react-native-win32 0.81.8 ViewAccessibility.d.ts declares these UIA action names; existing FURN V1 Checkbox and Switch use Toggle. Native UIA invocation still needs target-platform verification.
macOSToggleSelectRNmacOS 0.81.9 Fabric RCTViewComponentView.mm::accessibilityCustomActions exposes the declared names verbatim; didActivateAccessibilityCustomAction emits that exact name. These are custom actions, not an inferred AXPress mapping.
Other platformsToggleSelectRetains existing custom declarations; this is not native pattern or gesture qualification. Verify a renderer before claiming support.

These source paths are relative to the installed platform package:

  • RNW: Microsoft.ReactNative/Fabric/Composition/.
  • Win32: Libraries/Components/View/ViewAccessibility.d.ts.
  • RNmacOS Fabric: React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm.
  • RNmacOS Paper: React/Views/RCTView.m.

RNmacOS Fabric constructs custom actions from name, ignoring label; keep caller labels in JS rather than replacing them with guessed localized text. Paper instead maps a custom action's label back to its declared name and implements accessibilityPerformPress using activate or onAccessibilityTap. Fabric's accessibilityActivate only forwards onAccessibilityTap, and is not that AppKit press implementation. Do not map toggle/select to activate, synthesize onPress, or add an AXPress fallback based on Paper evidence.

The resolver normalizes only the owned semantic action's two known spellings. It deduplicates exact resulting names, preserves caller order and the first defined label (including an empty label), and prepends a missing owned action. Other custom names retain their case and identity; inputs are not mutated. An already normalized, duplicate-free array is returned unchanged. Incoming events are not rewritten or matched case-insensitively.

Future authoring requirements

  • Read the component contract and source-check the installed renderer's action declaration, event name, invocation, and default activation paths. Record versions and separate observed behavior from inference.
  • Keep the generic package entrypoint React-only import-safe. Use type-only native imports and explicit platform inputs for pure utilities, or an opt-in native implementation with an explicit unsupported generic facade. Never eagerly import Platform or a native module through the generic index. Preserve Framework Base's React 18 compatibility.
  • Keep disabled guards and controlled/uncontrolled or group state ownership in components. Compose the component behavior first, then forward the original caller event exactly once, including custom and disabled actions. Do not synthesize a pointer/keyboard event from an accessibility event.
  • Cover declaration casing, duplicate names, caller labels/actions, exact event matching, callback counts/order, and disabled state in unit tests. Add type coverage for public helpers and run the React-only import path.
  • Native qualification must invoke UIA TogglePattern.Toggle or SelectionItemPattern.Select, or the actual AX custom action, and assert native state plus callback counts. State read after a physical click, a Jest fireEvent, or a successful bundle is not native action-dispatch evidence. Report unsupported native actions and unrun platforms explicitly.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.