Add aria-* and role attributes (#59) Fixes #50.
1 file changed, 8 insertions(+), 0 deletions(-)
changed files
M html/attributes_test.go → html/attributes_test.go
@@ -57,6 +57,7 @@ "pattern": Pattern, "preload": Preload, "placeholder": Placeholder, "rel": Rel, + "role": Role, "rows": Rows, "src": Src, "style": StyleAttr,@@ -75,3 +76,10 @@ assert.Equal(t, fmt.Sprintf(`<div %v="hat"></div>`, name), n) }) } } + +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) + }) +}