Skip to content

Commit 3a4ede4

Browse files
committed
autoFocus and typo
1 parent c8bb309 commit 3a4ede4

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Because developers cannot override the RSK behavior, clicking RSK also calls `hi
7070

7171
[GitHub Pages](https://pages.github.com/) offers free hosting for public open-source repositories. This project uses the [JamesIves/github-pages-deploy-action](https://github.com/JamesIves/github-pages-deploy-action) GitHub Action to build and deploy HTML, CSS, and JS to the `gh-pages` branch.
7272

73-
:warning <u>Production</u>: although it's possible to configure [custom domain names](https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/about-custom-domains-and-github-pages), "GitHub Pages is not intended for or allowed to be used... either facilitating commercial transactions or providing commercial software" ([see Prohibited Uses](https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages#prohibited-uses)). Use GitHub Pages for production applications at your own risk.
73+
:warning: <u>Production</u>: although it's possible to configure [custom domain names](https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/about-custom-domains-and-github-pages), "GitHub Pages is not intended for or allowed to be used... either facilitating commercial transactions or providing commercial software" ([see Prohibited Uses](https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages#prohibited-uses)). Use GitHub Pages for production applications at your own risk.
7474

7575
## Developer Program
7676

src/components/OptionsMenu.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import PropTypes from 'prop-types'
22
import './OptionsMenu.css'
33
import React, { useEffect, useRef, useState } from 'react'
4-
import { autoFocusFirstFocusable } from '../utils/focus';
5-
import { useNavigate } from 'react-router';
4+
import { autoFocusFirstFocusable } from '../utils/focus'
5+
import { useNavigate } from 'react-router'
66

77
function OptionsMenu({
88
visible = false,
@@ -98,6 +98,7 @@ function OptionsMenu({
9898
React.cloneElement(child, {
9999
role: 'menuitem',
100100
tabIndex: index,
101+
autoFocus: (index === focusedIndex),
101102
onClick: () => handleClick(index),
102103
className: ((index === focusedIndex) ? 'focused' : '')
103104
})

src/pages/Settings.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ function SettingsComponent() {
6464
<div>
6565
<button
6666
ref={autoFocus}
67+
autoFocus
6768
className='focused'
6869
role='menuitem'
6970
onClick={showLanguageSelector}>

0 commit comments

Comments
 (0)