diff --git a/installer/data/mysql/atomicupdate/bug_33766-a11y_fix_ambiguous_form-field_in_opac-auth.tt b/installer/data/mysql/atomicupdate/bug_33766-a11y_fix_ambiguous_form-field_in_opac-auth.tt
new file mode 100755
index 0000000000..3bb5322875
--- /dev/null
+++ b/installer/data/mysql/atomicupdate/bug_33766-a11y_fix_ambiguous_form-field_in_opac-auth.tt
@@ -0,0 +1,18 @@
+use Modern::Perl;
+
+return {
+ bug_number => "33766",
+ description => "Add syspref to determine text content of userid input field's label.",
+ up => sub {
+ my ($args) = @_;
+ my ( $dbh, $out ) = @$args{qw(dbh out)};
+
+ # Do you stuffs here
+ $dbh->do(
+ q{INSERT IGNORE INTO systempreferences (variable,value) VALUES ('OPACLoginLabelTextContent','Cardnumber') }
+ );
+
+ # sysprefs
+ say $out "Added new system preference 'OPACLoginLabelTextContent'";
+ },
+};
diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql
index 7f5aad3553..0913272f5a 100644
--- a/installer/data/mysql/mandatory/sysprefs.sql
+++ b/installer/data/mysql/mandatory/sysprefs.sql
@@ -513,6 +513,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('OPACLocalCoverImages','0','1','Display local cover images on OPAC search and details pages.','YesNo'),
('OpacLocationBranchToDisplay','holding','holding|home|both','In the OPAC, under location show which branch for Location in the record details.','Choice'),
('OpacLocationOnDetail','holding','holding|home|both|column','In the OPAC detail, display the shelving location on its own column or under a library columns.', 'Choice'),
+('OPACLoginLabelTextContent','Cardnumber',NULL,NULL,NULL),
('OpacMaintenance','0','','If ON, enables maintenance warning in OPAC','YesNo'),
('OPACMandatoryHoldDates', '', '|start|end|both', 'Define which hold dates are required on OPAC reserve form', 'Choice'),
('OpacMaxItemsToDisplay','50','','Max items to display at the OPAC on a biblio detail','Integer'),
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
index ef816bf671..9bcaf0894b 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
@@ -181,6 +181,15 @@ OPAC:
column: "on a separate column"
- "for items on the OPAC record details page."
- "
Note: If 'on a separate column' is selected, you still need to enable the item_shelving_location display on the configure columns administration page."
+ -
+ - Use
+ - pref: OPACLoginLabelTextContent
+ default: Cardnumber
+ choices:
+ Cardnumber: Cardnumber
+ Username: Username
+ "Cardnumber or Username": Cardnumber or Username
+ - "as the text content of the userid input field's label."
-
- pref: OPACShowMusicalInscripts
default: 0
@@ -533,6 +542,7 @@ OPAC:
type: textarea
syntax: text/html
class: code
+
-
- pref: OpacBrowseSearch
default: 0
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc
index e284d1ec9b..201a1411b9 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc
@@ -438,7 +438,7 @@