@@ -64,12 +64,12 @@ export class IABookmarkEdit extends LitElement {
6464
6565 bookmarkColor ( color ) {
6666 return html `
67- <li >
67+ <div class = "color-option" >
6868 <input type= "radio" name = "color" id = "color_${ color . id } " .value = ${ color . id } @change = ${ ( ) => this . changeColorTo ( color . id ) } ?checked= ${ this . bookmark . color === color . id } >
69- <label for = "color_${ color . id } " >
70- <icon- bookmark class= ${ color . className } > </ icon- bookmark>
69+ <label for = "color_${ color . id } " title = ${ color . className } >
70+ <icon- bookmark class= ${ color . className } aria - hidden = "true" > </ icon- bookmark>
7171 </ label>
72- </ li >
72+ </ div >
7373 ` ;
7474 }
7575
@@ -87,18 +87,18 @@ export class IABookmarkEdit extends LitElement {
8787 ${ this . renderHeader ? IABookmarkEdit . headerSection : nothing }
8888 ${ this . showBookmark ? this . bookmarkTemplate : nothing }
8989 <for m action= "" method = "put" @submit = ${ this . emitSaveEvent } >
90+ <label for = "note" > Note <small> (optional)</ small> </ label>
91+ <textarea rows= "4" cols = "80" name= "not e" id= "not e" @change = ${ this . updateNote } > ${ this . bookmark . note } </ textarea>
9092 <fieldset>
91- <label for = "note" > Note <small> (optional)</ small> </ label>
92- <textarea rows= "4" cols = "80" name= "not e" id= "not e" @change = ${ this . updateNote } > ${ this . bookmark . note } </ textarea>
93- <label for = "color" > Bookmark color </ label>
94- <ul>
93+ <legend> Bookmark color </ legend>
94+ <div class= "color-options" >
9595 ${ repeat ( this . bookmarkColors , color => color . id , this . bookmarkColor . bind ( this ) ) }
96- </ ul>
97- <div class= "actions" >
98- <butto n type= "button" class = "ia- butto n cancel" @click = ${ this . emitDeleteEvent } > Delete </ butto n>
99- <input class= "ia-button" type = "submit" value= "Save">
10096 </ div>
10197 </ fieldset>
98+ <div class= "actions" >
99+ <butto n type= "button" class = "ia- butto n cancel" @click = ${ this . emitDeleteEvent } > Delete </ butto n>
100+ <input class= "ia-button" type = "submit" value= "Save">
101+ </ div>
102102 </ for m>
103103 ` ;
104104 }
@@ -128,11 +128,11 @@ export class IABookmarkEdit extends LitElement {
128128 }
129129
130130 fieldset {
131- padding : 2 rem 0 0 0 ;
131+ padding : 0 ;
132132 border : none;
133133 }
134134
135- label {
135+ label , legend {
136136 display : block;
137137 font-weight : bold;
138138 }
@@ -152,21 +152,24 @@ export class IABookmarkEdit extends LitElement {
152152 resize : vertical;
153153 }
154154
155- ul {
156- display : grid;
157- grid-template-columns : repeat (3 , auto);
158- grid-gap : 0 2rem ;
159- justify-content : start;
160- padding : 1rem 0 0 0 ;
161- margin : 0 0 2rem 0 ;
162- list-style : none;
155+ .color-options {
156+ display : flex;
157+ gap : 10px ;
158+ }
159+
160+ .color-option {
161+ position : relative;
163162 }
164163
165- li input {
166- display : none;
164+ .color-option input {
165+ position : absolute;
166+ opacity : 0 ;
167+ width : 0 ;
168+ height : 0 ;
169+ pointer-events : none;
167170 }
168171
169- li label {
172+ . color-option label {
170173 display : block;
171174 min-width : 50px ;
172175 padding-top : .4rem ;
@@ -176,10 +179,19 @@ export class IABookmarkEdit extends LitElement {
176179 cursor : pointer;
177180 }
178181
179- li input : checked + label {
182+ . color-option input : checked + label {
180183 border-color : var (--primaryTextColor );
181184 }
182185
186+ .color-option input : focus + label {
187+ outline : 2px solid currentColor;
188+ outline-offset : 2px ;
189+ }
190+
191+ .color-option input : focus : not (: focus-visible ) + label {
192+ outline : none;
193+ }
194+
183195 input [type = "submit" ] {
184196 background : var (--primaryCTAFill );
185197 border-color : var (--primaryCTABorder );
@@ -202,6 +214,7 @@ export class IABookmarkEdit extends LitElement {
202214 }
203215
204216 .actions {
217+ margin-top : 20px ;
205218 display : grid;
206219 grid-template-columns : auto auto;
207220 grid-gap : 0 1rem ;
0 commit comments