react-native-accessibility-engine
Version:
Make accessibility-related assertions on React Native code using React Test Renderer
24 lines (21 loc) • 635 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _helpers = require("../../helpers");
const rule = {
id: 'pressable-accessible-required',
matcher: node => (0, _helpers.isPressable)(node.type),
assertion: node => {
return node.props.accessible === false ? false : true;
},
help: {
problem: 'This button is not accessible (selectable) to the user',
solution: "Set the 'accessible' prop to 'true' or remove it (pressables are accessible by default)",
link: ''
}
};
var _default = rule;
exports.default = _default;
//# sourceMappingURL=index.js.map
;