This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Issue #287] aria-role-supports-props: false positive when role defin…
…ed by an expression closes #287 closes #282 fix aria-role-supports-props - in case the role is defined by expression or variable, means the role cannot be retrieved by tslint, it should pass the test
- Loading branch information
Showing
3 changed files
with
54 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...oleSupportsAriaProps/PassingTestInputs/UnretrievableRoleSupportsAllAriaPropsInElement.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import React = require('react'); | ||
|
||
const role = 'some role'; | ||
|
||
// Only one role. | ||
const a = <div role={ role } aria-controls /> | ||
const b = <div role={ role } aria-expanded /> | ||
const c = <div role={ role } aria-autocomplete /> | ||
const d = <div role={ role } aria-readonly /> | ||
const e = <div role={ role } aria-required /> | ||
const f = <div role={ role } aria-activedescendant /> | ||
const g = <div role={ role } aria-atomic /> | ||
const h = <div role={ role } aria-busy /> | ||
const i = <div role={ role } aria-current /> | ||
const j = <div role={ role } aria-describedby /> | ||
const k = <div role={ role } aria-details /> | ||
const l = <div role={ role } aria-disabled /> | ||
const m = <div role={ role } aria-dropeffect /> | ||
const n = <div role={ role } aria-errormessage /> | ||
const o = <div role={ role } aria-flowto /> | ||
const p = <div role={ role } aria-grabbed /> | ||
const r = <div role={ role } aria-haspopup /> | ||
const s = <div role={ role } aria-hidden /> | ||
const t = <div role={ role } aria-invalid /> | ||
const u = <div role={ role } aria-keyshortcuts /> | ||
const v = <div role={ role } aria-label /> | ||
const w = <div role={ role } aria-labelledby /> | ||
const x = <div role={ role } aria-live /> | ||
const y = <div role={ role } aria-orientation /> | ||
const z = <div role={ role } aria-owns /> | ||
const a1 = <div role={ role } aria-relevant /> | ||
const b1 = <div role={ role } aria-roledescription /> | ||
|
||
// Multiple roles. | ||
const c1 = <div role={ role } aria-expanded aria-pressed aria-readonly /> | ||
|
||
// when there have explicit role and implicit role, the explicit role will be used first. | ||
const d1 = <input role={ role } type='reset' aria-readonly /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters