Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
0d9967d2
Commit
0d9967d2
authored
Mar 04, 2021
by
peterhegman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mark required fields with `required` and `aria-required` attributes
To improve a11y
parent
309ebed4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
app/views/import/shared/_new_project_form.html.haml
app/views/import/shared/_new_project_form.html.haml
+2
-2
app/views/projects/_new_project_fields.html.haml
app/views/projects/_new_project_fields.html.haml
+2
-2
changelogs/unreleased/294436-create-project-required-fields.yml
...logs/unreleased/294436-create-project-required-fields.yml
+5
-0
No files found.
app/views/import/shared/_new_project_form.html.haml
View file @
0d9967d2
.row
.form-group.project-name.col-sm-12
=
label_tag
:name
,
_
(
'Project name'
),
class:
'label-bold'
=
text_field_tag
:name
,
@name
,
placeholder:
"My awesome project"
,
class:
"js-project-name form-control input-lg"
,
autofocus:
true
=
text_field_tag
:name
,
@name
,
placeholder:
"My awesome project"
,
class:
"js-project-name form-control input-lg"
,
autofocus:
true
,
required:
true
,
aria:
{
required:
true
}
.form-group.col-12.col-sm-6
=
label_tag
:namespace_id
,
_
(
'Project URL'
),
class:
'label-bold'
.form-group
...
...
@@ -18,4 +18,4 @@
=
hidden_field_tag
:namespace_id
,
current_user
.
namespace_id
.form-group.col-12.col-sm-6.project-path
=
label_tag
:path
,
_
(
'Project slug'
),
class:
'label-bold'
=
text_field_tag
:path
,
@path
,
placeholder:
"my-awesome-project"
,
class:
"js-path-name form-control"
,
required:
true
=
text_field_tag
:path
,
@path
,
placeholder:
"my-awesome-project"
,
class:
"js-path-name form-control"
,
required:
true
,
aria:
{
required:
true
}
app/views/projects/_new_project_fields.html.haml
View file @
0d9967d2
...
...
@@ -8,7 +8,7 @@
.form-group.project-name.col-sm-12
=
f
.
label
:name
,
class:
'label-bold'
do
%span
=
_
(
"Project name"
)
=
f
.
text_field
:name
,
placeholder:
"My awesome project"
,
class:
"form-control input-lg"
,
autofocus:
true
,
data:
{
track_label:
"
#{
track_label
}
"
,
track_event:
"activate_form_input"
,
track_property:
"project_name"
,
track_value:
""
}
=
f
.
text_field
:name
,
placeholder:
"My awesome project"
,
class:
"form-control input-lg"
,
autofocus:
true
,
data:
{
track_label:
"
#{
track_label
}
"
,
track_event:
"activate_form_input"
,
track_property:
"project_name"
,
track_value:
""
}
,
required:
true
,
aria:
{
required:
true
}
.form-group.project-path.col-sm-6
=
f
.
label
:namespace_id
,
class:
'label-bold'
do
%span
=
s_
(
"Project URL"
)
...
...
@@ -33,7 +33,7 @@
.form-group.project-path.col-sm-6
=
f
.
label
:path
,
class:
'label-bold'
do
%span
=
_
(
"Project slug"
)
=
f
.
text_field
:path
,
placeholder:
"my-awesome-project"
,
class:
"form-control"
,
required:
true
=
f
.
text_field
:path
,
placeholder:
"my-awesome-project"
,
class:
"form-control"
,
required:
true
,
aria:
{
required:
true
}
-
if
current_user
.
can_create_group?
.form-text.text-muted
-
link_start_group_path
=
'<a href="%{path}">'
%
{
path:
new_group_path
}
...
...
changelogs/unreleased/294436-create-project-required-fields.yml
0 → 100644
View file @
0d9967d2
---
title
:
Improve a11y of the new project form by marking required fields
merge_request
:
55682
author
:
type
:
performance
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment