eslint-plugin-smarthr 0.3.12 → 0.3.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.3.13](https://github.com/kufu/eslint-plugin-smarthr/compare/v0.3.12...v0.3.13) (2023-10-16)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* a11-heading-in-sectioning-contentのtag属性不要チェックのエラー位置を、タグの開始行ではなく属性の記述されている行に変更する ([#86](https://github.com/kufu/eslint-plugin-smarthr/issues/86)) ([e25080a](https://github.com/kufu/eslint-plugin-smarthr/commit/e25080a461ddce87eaaf20cd0c7ef290fd321836))
|
|
11
|
+
|
|
5
12
|
### [0.3.12](https://github.com/kufu/eslint-plugin-smarthr/compare/v0.3.11...v0.3.12) (2023-10-12)
|
|
6
13
|
|
|
7
14
|
|
package/package.json
CHANGED
|
@@ -39,8 +39,9 @@ const checkFalsyJSXText = (c) => (
|
|
|
39
39
|
!(c.type === 'JSXText' && c.value.match(REGEX_NLSP))
|
|
40
40
|
)
|
|
41
41
|
|
|
42
|
-
const message = `a, button
|
|
42
|
+
const message = `a, buttonなどのクリッカブルな要素内にはテキストを設定してください
|
|
43
43
|
- 要素内にアイコン、画像のみを設置する場合はaltなどの代替テキスト用属性を指定してください
|
|
44
|
+
- SVG component の場合、altを属性として受け取れるようにした上で '<svg role="img" aria-label={alt}>' のように指定してください
|
|
44
45
|
- クリッカブルな要素内に設置しているコンポーネントがテキストを含んでいる場合、"XxxxText" のように末尾に "Text" もしくは "Message" という名称を設定してください`
|
|
45
46
|
|
|
46
47
|
module.exports = {
|
|
@@ -12,8 +12,9 @@ const ruleTester = new RuleTester({
|
|
|
12
12
|
},
|
|
13
13
|
})
|
|
14
14
|
|
|
15
|
-
const defaultErrorMessage = `a, button
|
|
15
|
+
const defaultErrorMessage = `a, buttonなどのクリッカブルな要素内にはテキストを設定してください
|
|
16
16
|
- 要素内にアイコン、画像のみを設置する場合はaltなどの代替テキスト用属性を指定してください
|
|
17
|
+
- SVG component の場合、altを属性として受け取れるようにした上で '<svg role="img" aria-label={alt}>' のように指定してください
|
|
17
18
|
- クリッカブルな要素内に設置しているコンポーネントがテキストを含んでいる場合、"XxxxText" のように末尾に "Text" もしくは "Message" という名称を設定してください`
|
|
18
19
|
|
|
19
20
|
ruleTester.run('a11y-clickable-element-has-text', rule, {
|