From 6efec2175f61125c3cae694b9a4327a990484ca0 Mon Sep 17 00:00:00 2001 From: Markus Wüstenberg Date: Tue, 22 Dec 2020 11:07:33 +0100 Subject: Add aria-* and role attributes (#59) Fixes #50.--- html/attributes_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'html/attributes_test.go') 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) + }) +} -- cgit 1.4.1