diff options
author | Markus Wüstenberg | 2020-12-22 11:07:33 +0100 |
---|---|---|
committer | GitHub | 2020-12-22 11:07:33 +0100 |
commit | 6efec2175f61125c3cae694b9a4327a990484ca0 (patch) | |
tree | a1aa13a8dc28a747bb36961016b3c43f0a15cef3 /html/attributes_test.go | |
parent | f22ce3fb68ca6702a683b7759410ae50a9fddabd (diff) | |
download | gomponents-6efec2175f61125c3cae694b9a4327a990484ca0.tar.lz gomponents-6efec2175f61125c3cae694b9a4327a990484ca0.tar.zst gomponents-6efec2175f61125c3cae694b9a4327a990484ca0.zip |
Add aria-* and role attributes (#59)
Fixes #50.
Diffstat (limited to 'html/attributes_test.go')
-rw-r--r-- | html/attributes_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/html/attributes_test.go b/html/attributes_test.go index ba8cbb4..23445db 100644 --- a/html/attributes_test.go +++ b/html/attributes_test.go @@ -57,6 +57,7 @@ func TestSimpleAttributes(t *testing.T) { "preload": Preload, "placeholder": Placeholder, "rel": Rel, + "role": Role, "rows": Rows, "src": Src, "style": StyleAttr, @@ -75,3 +76,10 @@ func TestSimpleAttributes(t *testing.T) { }) } } + +func TestAria(t *testing.T) { + t.Run("returns an attribute which name is prefixed with aria-", func(t *testing.T) { + n := Aria("selected", "true") + assert.Equal(t, ` aria-selected="true"`, n) + }) +} |