Skip to content

Commit 04e80a5

Browse files
authored
accessibility fix (#830)
1 parent 2f97fc5 commit 04e80a5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

class-two-factor-core.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2047,6 +2047,7 @@ public static function user_two_factor_options( $user ) {
20472047
<?php endforeach; ?>
20482048

20492049
<fieldset id="two-factor-options" <?php echo $show_2fa_options ? '' : 'disabled="disabled"'; ?>>
2050+
<legend class="screen-reader-text"><?php esc_html_e( 'Two-Factor Options', 'two-factor' ); ?></legend>
20502051
<?php
20512052
if ( $providers ) {
20522053
self::render_user_providers_form( $user, $providers );
@@ -2161,9 +2162,9 @@ private static function render_user_providers_form( $user, $providers ) {
21612162
<table class="form-table two-factor-primary-method-table" role="presentation">
21622163
<tbody>
21632164
<tr>
2164-
<th><?php esc_html_e( 'Primary Method', 'two-factor' ); ?></th>
2165+
<th><label for="two-factor-primary-provider"><?php esc_html_e( 'Primary Method', 'two-factor' ); ?></label></th>
21652166
<td>
2166-
<select name="<?php echo esc_attr( self::PROVIDER_USER_META_KEY ); ?>">
2167+
<select id="two-factor-primary-provider" name="<?php echo esc_attr( self::PROVIDER_USER_META_KEY ); ?>">
21672168
<option value=""><?php echo esc_html( __( 'Default', 'two-factor' ) ); ?></option>
21682169
<?php foreach ( $providers as $provider_key => $object ) : ?>
21692170
<option value="<?php echo esc_attr( $provider_key ); ?>" <?php selected( $provider_key, $primary_provider_key ); ?> <?php disabled( ! in_array( $provider_key, $enabled_providers, true ) ); ?>>

0 commit comments

Comments
 (0)