react-native-accessibility-engine
Version:
Make accessibility-related assertions on React Native code using React Test Renderer
26 lines (22 loc) • 779 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _helpers = require("../../helpers");
const rule = {
id: 'disabled-state-required',
matcher: node => (0, _helpers.canBeDisabled)(node),
assertion: node => {
var _node$props$accessibi;
return ((_node$props$accessibi = node.props.accessibilityState) === null || _node$props$accessibi === void 0 ? void 0 : _node$props$accessibi.disabled) !== undefined;
},
help: {
problem: "This component has a disabled state but it isn't exposed to the user",
solution: "Set the 'accessibilityState' prop to an object containing a boolean 'disabled' key",
link: ''
}
};
var _default = rule;
exports.default = _default;
//# sourceMappingURL=index.js.map
;