<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Creating accessible / keyboard navigation UI components in ArcGIS Experience Builder Questions</title>
    <link>https://community.esri.com/t5/arcgis-experience-builder-questions/creating-accessible-keyboard-navigation-ui/m-p/1013640#M1344</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm developing my own widget / UI for Experience Builder. I'm trying to ensure I create accessible components that allow keyboard navigation. By default, TAB does move from element to element. But on my Label/Checkbox components I do NOT see any sort of highlight/selection on the element. (It does work out of the box with &amp;lt; A href= &amp;gt; components.)&lt;/P&gt;&lt;P&gt;I was able to find one method that achieves some of what I desire, but creating the component in this way does not honor the app theme / color.&lt;BR /&gt;The first component here is created with a &amp;lt;Label check&amp;gt; and &amp;lt;Input type="checkbox"&amp;gt; (first code snippet below) and shows keyboard focus. The second element is created with &amp;lt;Label&amp;gt; and &amp;lt;Checkbox&amp;gt; and will not show&amp;nbsp;focus, but does respect the app's theme.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="UI.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/3158i6DFAA837C11FA21B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="UI.png" alt="UI.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is my desired keyboard focus (show inactive facilities), as set by manually having Chrome apply focus.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ui2.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/3159i27FB7EAAFB8765EB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ui2.png" alt="ui2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Can anyone steer me towards the right combination to get the keyboard focus while respecting the app's theme?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Reference code:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1st component:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;&amp;lt;Label check&amp;gt;
	&amp;lt;Input type="checkbox" aria-label= {defaultMessages.cluster_aria} id="clusterTglId" name="clusterTgl" checked={this.state.clusterinOn} onChange={(e) =&amp;gt; {this.UI_Update({
	target: {
		name: e.target.name,
		value: e.target.checked,
		},
	}); 
	}}
	/&amp;gt;{defaultMessages.cluster_btn}
&amp;lt;/Label&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2nd component&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// this css doesnt help if included or excluded	
const highlight = css`		
:focus {
	outline-offset:2px solid orange;
	outline: webkit-focus-ring-color auto 1px;
  }
`;

&amp;lt;Label css={highlight}&amp;gt;
&amp;lt;Checkbox aria-label= {defaultMessages.inactive_aria} name="activechk" checked={this.state.inactive} onChange={(e) =&amp;gt; {this.UI_Update({
		target: {
			name: e.target.name,
			value: e.target.checked,
			},
		}); 
	}}
/&amp;gt; {defaultMessages.inactive_btn}   &amp;lt;/Label&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 04 Jan 2021 17:35:17 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2021-01-04T17:35:17Z</dc:date>
    <item>
      <title>Creating accessible / keyboard navigation UI components</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/creating-accessible-keyboard-navigation-ui/m-p/1013640#M1344</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm developing my own widget / UI for Experience Builder. I'm trying to ensure I create accessible components that allow keyboard navigation. By default, TAB does move from element to element. But on my Label/Checkbox components I do NOT see any sort of highlight/selection on the element. (It does work out of the box with &amp;lt; A href= &amp;gt; components.)&lt;/P&gt;&lt;P&gt;I was able to find one method that achieves some of what I desire, but creating the component in this way does not honor the app theme / color.&lt;BR /&gt;The first component here is created with a &amp;lt;Label check&amp;gt; and &amp;lt;Input type="checkbox"&amp;gt; (first code snippet below) and shows keyboard focus. The second element is created with &amp;lt;Label&amp;gt; and &amp;lt;Checkbox&amp;gt; and will not show&amp;nbsp;focus, but does respect the app's theme.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="UI.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/3158i6DFAA837C11FA21B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="UI.png" alt="UI.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is my desired keyboard focus (show inactive facilities), as set by manually having Chrome apply focus.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ui2.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/3159i27FB7EAAFB8765EB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ui2.png" alt="ui2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Can anyone steer me towards the right combination to get the keyboard focus while respecting the app's theme?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Reference code:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1st component:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;&amp;lt;Label check&amp;gt;
	&amp;lt;Input type="checkbox" aria-label= {defaultMessages.cluster_aria} id="clusterTglId" name="clusterTgl" checked={this.state.clusterinOn} onChange={(e) =&amp;gt; {this.UI_Update({
	target: {
		name: e.target.name,
		value: e.target.checked,
		},
	}); 
	}}
	/&amp;gt;{defaultMessages.cluster_btn}
&amp;lt;/Label&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2nd component&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// this css doesnt help if included or excluded	
const highlight = css`		
:focus {
	outline-offset:2px solid orange;
	outline: webkit-focus-ring-color auto 1px;
  }
`;

&amp;lt;Label css={highlight}&amp;gt;
&amp;lt;Checkbox aria-label= {defaultMessages.inactive_aria} name="activechk" checked={this.state.inactive} onChange={(e) =&amp;gt; {this.UI_Update({
		target: {
			name: e.target.name,
			value: e.target.checked,
			},
		}); 
	}}
/&amp;gt; {defaultMessages.inactive_btn}   &amp;lt;/Label&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2021 17:35:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/creating-accessible-keyboard-navigation-ui/m-p/1013640#M1344</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-01-04T17:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: Creating accessible / keyboard navigation UI components</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/creating-accessible-keyboard-navigation-ui/m-p/1014763#M1362</link>
      <description>&lt;P&gt;Hi Kevin,&lt;/P&gt;&lt;P&gt;Currently, we do not have focus style support on our components. This is something we are currently working on and will be implemented over several releases. To support this today you would have to add your own styles to support this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 18:15:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/creating-accessible-keyboard-navigation-ui/m-p/1014763#M1362</guid>
      <dc:creator>DavidMartinez</dc:creator>
      <dc:date>2021-01-07T18:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: Creating accessible / keyboard navigation UI components</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/creating-accessible-keyboard-navigation-ui/m-p/1016931#M1396</link>
      <description>&lt;P&gt;For sake of completion, the code solution is to use&amp;nbsp;&lt;STRONG&gt;focus-within&lt;/STRONG&gt;&lt;STRONG&gt;.&amp;nbsp;&lt;/STRONG&gt;Normal css&amp;nbsp;&lt;STRONG&gt;focus&lt;/STRONG&gt;&amp;nbsp;isn't enough.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;		const focusOutline = css`
			:focus-within {
				outline :1px solid black;
			}
		`

					&amp;lt;Label check css={focusOutline}&amp;gt;
						&amp;lt;Checkbox aria-label= {defaultMessages.cluster_aria} id="clusterTglId" name="clusterTgl" checked={this.state.clusterinOn} onChange={(e) =&amp;gt; {this.UI_Update({
						target: {
							name: e.target.name,
							value: e.target.checked,
							},
						}); 
						}}
						/&amp;gt;{defaultMessages.cluster_btn}
					&amp;lt;/Label&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2021 16:48:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/creating-accessible-keyboard-navigation-ui/m-p/1016931#M1396</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-01-14T16:48:06Z</dc:date>
    </item>
  </channel>
</rss>

