|
| 1 | +extends: substitution |
| 2 | +message: "Use '%s' instead of '%s' for clarity and accessibility." |
| 3 | +link: https://docs.digitalocean.com/style/digitalocean/language/verbs |
| 4 | +ignorecase: true |
| 5 | +level: error |
| 6 | +action: |
| 7 | + name: replace |
| 8 | +swap: |
| 9 | + # Prefer "enter" over "type" for text input fields and form values |
| 10 | + # Based on Microsoft Manual of Style and accessibility best practices |
| 11 | + # "Enter" is device-agnostic and works for keyboard, voice, paste, and other input methods |
| 12 | + type (?:in|into) the (\w+) (field|box): enter in the $1 $2 |
| 13 | + type your (\w+) (?:in|into) the (?:\w+ )?(field|box): enter your $1 in the $2 |
| 14 | + type (?:the|a|an) (\w+) (?:in|into) the (?:\w+ )?(field|box): enter $1 in the $2 |
| 15 | + type or (?:copy and )?paste: enter |
| 16 | + |
| 17 | + # Prefer "select" over "click" for UI interactions |
| 18 | + # "Select" works with keyboard, mouse, touch, voice, and assistive technologies |
| 19 | + click the (\*\*[^*]+\*\*) button: select the $1 button |
| 20 | + click the (\*\*[^*]+\*\*) link: select the $1 link |
| 21 | + click on the (\*\*[^*]+\*\*) button: select the $1 button |
| 22 | + click on the (\*\*[^*]+\*\*) link: select the $1 link |
| 23 | + click the (\w+(?:\s+\w+)?) button: select the $1 button |
| 24 | + click the (\w+(?:\s+\w+)?) link: select the $1 link |
| 25 | + click on the (\w+(?:\s+\w+)?) button: select the $1 button |
| 26 | + click on the (\w+(?:\s+\w+)?) link: select the $1 link |
| 27 | + click the (\w+(?:\s+\w+)?) checkbox: select the $1 checkbox |
| 28 | + click on the (\w+(?:\s+\w+)?) checkbox: select the $1 checkbox |
| 29 | + click to (\w+): select to $1 |
0 commit comments