Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
294
Merge Requests
294
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
84cad37f
Commit
84cad37f
authored
Oct 05, 2014
by
alexpott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2346101
by realityloop: Fixed Alternate text should be called Alternative text.
parent
1e727b38
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
7 additions
and
7 deletions
+7
-7
core/modules/image/config/schema/image.data_types.schema.yml
core/modules/image/config/schema/image.data_types.schema.yml
+1
-1
core/modules/image/config/schema/image.schema.yml
core/modules/image/config/schema/image.schema.yml
+1
-1
core/modules/image/src/Plugin/Field/FieldType/ImageItem.php
core/modules/image/src/Plugin/Field/FieldType/ImageItem.php
+1
-1
core/modules/image/src/Plugin/Field/FieldWidget/ImageWidget.php
...odules/image/src/Plugin/Field/FieldWidget/ImageWidget.php
+1
-1
core/modules/image/src/Tests/ImageFieldDisplayTest.php
core/modules/image/src/Tests/ImageFieldDisplayTest.php
+1
-1
core/modules/image/src/Tests/ImageFieldValidateTest.php
core/modules/image/src/Tests/ImageFieldValidateTest.php
+1
-1
core/modules/image/templates/image-style.html.twig
core/modules/image/templates/image-style.html.twig
+1
-1
No files found.
core/modules/image/config/schema/image.data_types.schema.yml
View file @
84cad37f
...
...
@@ -18,7 +18,7 @@ field_default_image:
label
:
'
Image'
alt
:
type
:
label
label
:
'
Alternate
text'
label
:
'
Alternat
iv
e
text'
title
:
type
:
label
label
:
'
Title'
...
...
core/modules/image/config/schema/image.schema.yml
View file @
84cad37f
...
...
@@ -123,7 +123,7 @@ field.image.value:
label
:
'
File
ID'
alt
:
type
:
string
label
:
'
Alternate
text'
label
:
'
Alternat
iv
e
text'
title
:
type
:
string
label
:
'
Title
text'
...
...
core/modules/image/src/Plugin/Field/FieldType/ImageItem.php
View file @
84cad37f
...
...
@@ -411,7 +411,7 @@ protected function defaultImageForm(array &$element, array $settings) {
);
$element
[
'default_image'
][
'alt'
]
=
array
(
'#type'
=>
'textfield'
,
'#title'
=>
t
(
'Alternate text'
),
'#title'
=>
t
(
'Alternat
iv
e text'
),
'#description'
=>
t
(
'This text will be used by screen readers, search engines, and when the image cannot be loaded.'
),
'#default_value'
=>
$settings
[
'default_image'
][
'alt'
],
'#maxlength'
=>
512
,
...
...
core/modules/image/src/Plugin/Field/FieldWidget/ImageWidget.php
View file @
84cad37f
...
...
@@ -221,7 +221,7 @@ public static function process($element, FormStateInterface $form_state, $form)
// Add the additional alt and title fields.
$element
[
'alt'
]
=
array
(
'#title'
=>
t
(
'Alternate text'
),
'#title'
=>
t
(
'Alternat
iv
e text'
),
'#type'
=>
'textfield'
,
'#default_value'
=>
isset
(
$item
[
'alt'
])
?
$item
[
'alt'
]
:
''
,
'#description'
=>
t
(
'This text will be used by screen readers, search engines, or when the image cannot be loaded.'
),
...
...
core/modules/image/src/Tests/ImageFieldDisplayTest.php
View file @
84cad37f
...
...
@@ -231,7 +231,7 @@ function testImageFieldSettings() {
);
$this
->
drupalPostForm
(
'node/'
.
$nid
.
'/edit'
,
$edit
,
t
(
'Save and keep published'
));
$schema
=
$field
->
getFieldStorageDefinition
()
->
getSchema
();
$this
->
assertRaw
(
t
(
'Alternate text cannot be longer than %max characters but is currently %length characters long.'
,
array
(
$this
->
assertRaw
(
t
(
'Alternat
iv
e text cannot be longer than %max characters but is currently %length characters long.'
,
array
(
'%max'
=>
$schema
[
'columns'
][
'alt'
][
'length'
],
'%length'
=>
$test_size
,
)));
...
...
core/modules/image/src/Tests/ImageFieldValidateTest.php
View file @
84cad37f
...
...
@@ -65,7 +65,7 @@ function testRequiredAttributes() {
// Let's just use the first image.
$image
=
$images
[
0
];
$this
->
uploadNodeImage
(
$image
,
$field_name
,
'article'
);
$this
->
assertText
(
t
(
'The field Alternate text is required'
),
'Node save failed when alt text required was set and alt text was left empty.'
);
$this
->
assertText
(
t
(
'The field Alternat
iv
e text is required'
),
'Node save failed when alt text required was set and alt text was left empty.'
);
$this
->
assertText
(
t
(
'The field Title is required'
),
'Node save failed when title text required was set and title text was left empty.'
);
}
}
core/modules/image/templates/image-style.html.twig
View file @
84cad37f
...
...
@@ -10,7 +10,7 @@
* - width: The width of the image (if known).
* - height: The height of the image (if known).
* - title: The title of the image.
* - alt: The alternate text for the image.
* - alt: The alternat
iv
e text for the image.
*
* @see template_preprocess_image_style()
*
...
...
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