summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxjm2016-05-26 14:12:15 -0500
committerxjm2016-05-26 14:12:15 -0500
commit8e2cf9db20a40584f99db127205a553004b78907 (patch)
treeb756d377054e73b3a2776143278aea9c0f03faea
parent1eb935f9dd0055724ce606654a48ac1ea720e4c8 (diff)
Issue #2546248 by scythian, XaviP, darrenwh, mikebell_, ingaro, urbanlegend, jhodgdon, davidhernandez, andypost, joelpittet, emma.maria, cdykstra, Cottser, LewisNyman, joachim: Use consistent style to mention HTML tags in code comments
-rw-r--r--core/includes/theme.inc26
-rw-r--r--core/misc/ajax.js10
-rw-r--r--core/misc/tableselect.js2
-rw-r--r--core/modules/field_ui/templates/field-ui-table.html.twig2
-rw-r--r--core/modules/system/templates/fieldset.html.twig23
-rw-r--r--core/modules/system/templates/region.html.twig2
-rw-r--r--core/modules/system/templates/select.html.twig4
-rw-r--r--core/modules/system/templates/table.html.twig4
-rw-r--r--core/modules/system/templates/textarea.html.twig2
-rw-r--r--core/themes/classy/templates/dataset/table.html.twig4
-rw-r--r--core/themes/classy/templates/form/fieldset.html.twig2
-rw-r--r--core/themes/classy/templates/form/select.html.twig4
-rw-r--r--core/themes/classy/templates/form/textarea.html.twig2
-rw-r--r--core/themes/classy/templates/layout/region.html.twig2
-rw-r--r--core/themes/seven/css/components/tables.css2
-rw-r--r--core/themes/stable/templates/admin/field-ui-table.html.twig4
-rw-r--r--core/themes/stable/templates/dataset/table.html.twig4
17 files changed, 50 insertions, 49 deletions
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 646e428..9b89250 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -596,7 +596,7 @@ function template_preprocess_datetime_wrapper(&$variables) {
*
* Unfortunately links templates duplicate the "active" class handling of l()
* and LinkGenerator::generate() because it needs to be able to set the "active"
- * class not on the links themselves ("a" tags), but on the list items ("li"
+ * class not on the links themselves (<a> tags), but on the list items (<li>
* tags) that contain the links. This is necessary for CSS to be able to style
* list items differently when the link is active, since CSS does not yet allow
* one to style list items only if it contains a certain element with a certain
@@ -656,7 +656,7 @@ function template_preprocess_links(&$variables) {
if (!empty($links)) {
// Prepend the heading to the list, if any.
if (!empty($heading)) {
- // Convert a string heading into an array, using a H2 tag by default.
+ // Convert a string heading into an array, using a <h2> tag by default.
if (is_string($heading)) {
$heading = array('text' => $heading);
}
@@ -858,28 +858,28 @@ function template_preprocess_image(&$variables) {
* - colgroups: An array of column groups. Each element of the array can be
* either:
* - An array of columns, each of which is an associative array of HTML
- * attributes applied to the COL element.
- * - An array of attributes applied to the COLGROUP element, which must
- * include a "data" attribute. To add attributes to COL elements, set the
- * "data" attribute with an array of columns, each of which is an
+ * attributes applied to the <col> element.
+ * - An array of attributes applied to the <colgroup> element, which must
+ * include a "data" attribute. To add attributes to <col> elements,
+ * set the "data" attribute with an array of columns, each of which is an
* associative array of HTML attributes.
* Here's an example for $colgroup:
* @code
* $colgroup = array(
- * // COLGROUP with one COL element.
+ * // <colgroup> with one <col> element.
* array(
* array(
- * 'class' => array('funky'), // Attribute for the COL element.
+ * 'class' => array('funky'), // Attribute for the <col> element.
* ),
* ),
- * // Colgroup with attributes and inner COL elements.
+ * // <colgroup> with attributes and inner <col> elements.
* array(
* 'data' => array(
* array(
- * 'class' => array('funky'), // Attribute for the COL element.
+ * 'class' => array('funky'), // Attribute for the <col> element.
* ),
* ),
- * 'class' => array('jazzy'), // Attribute for the COLGROUP element.
+ * 'class' => array('jazzy'), // Attribute for the <colgroup> element.
* ),
* );
* @endcode
@@ -1157,7 +1157,7 @@ function template_preprocess_container(&$variables) {
* An associative array containing:
* - items: An associative array of maintenance tasks.
* It's the caller's responsibility to ensure this array's items contain no
- * dangerous HTML such as SCRIPT tags.
+ * dangerous HTML such as <script> tags.
* - active: The key for the currently active maintenance task.
*/
function template_preprocess_maintenance_task_list(&$variables) {
@@ -1267,7 +1267,7 @@ function template_preprocess_html(&$variables) {
$variables['html_attributes'] = new Attribute();
- // HTML element attributes.
+ // <html> element attributes.
$language_interface = \Drupal::languageManager()->getCurrentLanguage();
$variables['html_attributes']['lang'] = $language_interface->getId();
$variables['html_attributes']['dir'] = $language_interface->getDirection();
diff --git a/core/misc/ajax.js b/core/misc/ajax.js
index 061b594..fefe9f3 100644
--- a/core/misc/ajax.js
+++ b/core/misc/ajax.js
@@ -1035,11 +1035,11 @@
// been sufficiently tested whether attachBehaviors() can be successfully
// called with a context object that includes top-level text nodes.
// However, to give developers full control of the HTML appearing in the
- // page, and to enable Ajax content to be inserted in places where DIV
- // elements are not allowed (e.g., within TABLE, TR, and SPAN parents),
- // we check if the new content satisfies the requirement of a single
- // top-level element, and only use the container DIV created above when
- // it doesn't. For more information, please see
+ // page, and to enable Ajax content to be inserted in places where <div>
+ // elements are not allowed (e.g., within <table>, <tr>, and <span>
+ // parents), we check if the new content satisfies the requirement
+ // of a single top-level element, and only use the container <div> created
+ // above when it doesn't. For more information, please see
// https://www.drupal.org/node/736066.
if ($new_content.length !== 1 || $new_content.get(0).nodeType !== 1) {
$new_content = $new_content_wrapped;
diff --git a/core/misc/tableselect.js b/core/misc/tableselect.js
index 053af05..243e000 100644
--- a/core/misc/tableselect.js
+++ b/core/misc/tableselect.js
@@ -101,7 +101,7 @@
// range. Also make sure that we are actually checking checkboxes
// over a range and that a checkbox has been checked or unchecked before.
if (e.shiftKey && lastChecked && lastChecked !== e.target) {
- // We use the checkbox's parent TR to do our range searching.
+ // We use the checkbox's parent <tr> to do our range searching.
Drupal.tableSelectRange($(e.target).closest('tr')[0], $(lastChecked).closest('tr')[0], e.target.checked);
}
diff --git a/core/modules/field_ui/templates/field-ui-table.html.twig b/core/modules/field_ui/templates/field-ui-table.html.twig
index f7ff026..68c8c8e 100644
--- a/core/modules/field_ui/templates/field-ui-table.html.twig
+++ b/core/modules/field_ui/templates/field-ui-table.html.twig
@@ -24,7 +24,7 @@
* - no_striping: A flag indicating that the row should receive no
* 'even / odd' styling. Defaults to FALSE.
* - cells: Table cells of the row. Each cell contains the following keys:
- * - tag: The HTML tag name to use; either TH or TD.
+ * - tag: The HTML tag name to use; either 'th' or 'td'.
* - attributes: Any HTML attributes, such as "colspan", to apply to the
* table cell.
* - content: The string to display in the table cell.
diff --git a/core/modules/system/templates/fieldset.html.twig b/core/modules/system/templates/fieldset.html.twig
index b67ec85..bacd1d4 100644
--- a/core/modules/system/templates/fieldset.html.twig
+++ b/core/modules/system/templates/fieldset.html.twig
@@ -4,18 +4,19 @@
* Default theme implementation for a fieldset element and its children.
*
* Available variables:
- * - attributes: HTML attributes for the fieldset element.
- * - errors: (optional) Any errors for this fieldset element, may not be set.
- * - required: Boolean indicating whether the fieldeset element is required.
- * - legend: The legend element containing the following properties:
- * - title: Title of the fieldset, intended for use as the text of the legend.
- * - attributes: HTML attributes to apply to the legend.
+ * - attributes: HTML attributes for the <fieldset> element.
+ * - errors: (optional) Any errors for this <fieldset> element, may not be set.
+ * - required: Boolean indicating whether the <fieldeset> element is required.
+ * - legend: The <legend> element containing the following properties:
+ * - title: Title of the <fieldset>, intended for use as the text
+ of the <legend>.
+ * - attributes: HTML attributes to apply to the <legend> element.
* - description: The description element containing the following properties:
- * - content: The description content of the fieldset.
+ * - content: The description content of the <fieldset>.
* - attributes: HTML attributes to apply to the description container.
- * - children: The rendered child elements of the fieldset.
- * - prefix: The content to add before the fieldset children.
- * - suffix: The content to add after the fieldset children.
+ * - children: The rendered child elements of the <fieldset>.
+ * - prefix: The content to add before the <fieldset> children.
+ * - suffix: The content to add after the <fieldset> children.
*
* @see template_preprocess_fieldset()
*
@@ -38,7 +39,7 @@
required ? 'form-required',
]
%}
- {# Always wrap fieldset legends in a SPAN for CSS positioning. #}
+ {# Always wrap fieldset legends in a <span> for CSS positioning. #}
<legend{{ legend.attributes }}>
<span{{ legend_span.attributes.addClass(legend_span_classes) }}>{{ legend.title }}</span>
</legend>
diff --git a/core/modules/system/templates/region.html.twig b/core/modules/system/templates/region.html.twig
index e009455..219e14b 100644
--- a/core/modules/system/templates/region.html.twig
+++ b/core/modules/system/templates/region.html.twig
@@ -5,7 +5,7 @@
*
* Available variables:
* - content: The content for this region, typically blocks.
- * - attributes: HTML attributes for the region div.
+ * - attributes: HTML attributes for the region <div>.
* - region: The name of the region variable as defined in the theme's
* .info.yml file.
*
diff --git a/core/modules/system/templates/select.html.twig b/core/modules/system/templates/select.html.twig
index fb7226e..0b5c3d2 100644
--- a/core/modules/system/templates/select.html.twig
+++ b/core/modules/system/templates/select.html.twig
@@ -4,8 +4,8 @@
* Default theme implementation for a select element.
*
* Available variables:
- * - attributes: HTML attributes for the select tag.
- * - options: The option element children.
+ * - attributes: HTML attributes for the <select> tag.
+ * - options: The <option> element children.
*
* @see template_preprocess_select()
*
diff --git a/core/modules/system/templates/table.html.twig b/core/modules/system/templates/table.html.twig
index f6b32e4..4436570 100644
--- a/core/modules/system/templates/table.html.twig
+++ b/core/modules/system/templates/table.html.twig
@@ -12,7 +12,7 @@
* https://www.drupal.org/node/893530 and
* http://api.drupal.org/api/drupal/includes!theme.inc/function/theme_table/7#comment-5109.
* - header: Table header cells. Each cell contains the following properties:
- * - tag: The HTML tag name to use; either TH or TD.
+ * - tag: The HTML tag name to use; either 'th' or 'td'.
* - attributes: HTML attributes to apply to the tag.
* - content: A localized string for the title of the column.
* - field: Field name (required for column sorting).
@@ -24,7 +24,7 @@
* - no_striping: A flag indicating that the row should receive no
* 'even / odd' styling. Defaults to FALSE.
* - cells: Table cells of the row. Each cell contains the following keys:
- * - tag: The HTML tag name to use; either TH or TD.
+ * - tag: The HTML tag name to use; either 'th' or 'td'.
* - attributes: Any HTML attributes, such as "colspan", to apply to the
* table cell.
* - content: The string to display in the table cell.
diff --git a/core/modules/system/templates/textarea.html.twig b/core/modules/system/templates/textarea.html.twig
index 6a1a46e..cd987d2 100644
--- a/core/modules/system/templates/textarea.html.twig
+++ b/core/modules/system/templates/textarea.html.twig
@@ -5,7 +5,7 @@
*
* Available variables
* - wrapper_attributes: A list of HTML attributes for the wrapper element.
- * - attributes: A list of HTML attributes for the textarea element.
+ * - attributes: A list of HTML attributes for the <textarea> element.
* - resizable: An indicator for whether the textarea is resizable.
* - required: An indicator for whether the textarea is required.
* - value: The textarea content.
diff --git a/core/themes/classy/templates/dataset/table.html.twig b/core/themes/classy/templates/dataset/table.html.twig
index 70801d6..2afa9c1 100644
--- a/core/themes/classy/templates/dataset/table.html.twig
+++ b/core/themes/classy/templates/dataset/table.html.twig
@@ -12,7 +12,7 @@
* https://www.drupal.org/node/893530 and
* http://api.drupal.org/api/drupal/includes!theme.inc/function/theme_table/7#comment-5109.
* - header: Table header cells. Each cell contains the following properties:
- * - tag: The HTML tag name to use; either TH or TD.
+ * - tag: The HTML tag name to use; either 'th' or 'td'.
* - attributes: HTML attributes to apply to the tag.
* - content: A localized string for the title of the column.
* - field: Field name (required for column sorting).
@@ -24,7 +24,7 @@
* - no_striping: A flag indicating that the row should receive no
* 'even / odd' styling. Defaults to FALSE.
* - cells: Table cells of the row. Each cell contains the following keys:
- * - tag: The HTML tag name to use; either TH or TD.
+ * - tag: The HTML tag name to use; either 'th' or 'td'.
* - attributes: Any HTML attributes, such as "colspan", to apply to the
* table cell.
* - content: The string to display in the table cell.
diff --git a/core/themes/classy/templates/form/fieldset.html.twig b/core/themes/classy/templates/form/fieldset.html.twig
index 4bd7d0a..0d089ed 100644
--- a/core/themes/classy/templates/form/fieldset.html.twig
+++ b/core/themes/classy/templates/form/fieldset.html.twig
@@ -36,7 +36,7 @@
required ? 'form-required',
]
%}
- {# Always wrap fieldset legends in a SPAN for CSS positioning. #}
+ {# Always wrap fieldset legends in a <span> for CSS positioning. #}
<legend{{ legend.attributes }}>
<span{{ legend_span.attributes.addClass(legend_span_classes) }}>{{ legend.title }}</span>
</legend>
diff --git a/core/themes/classy/templates/form/select.html.twig b/core/themes/classy/templates/form/select.html.twig
index 3150bdc..8af4261 100644
--- a/core/themes/classy/templates/form/select.html.twig
+++ b/core/themes/classy/templates/form/select.html.twig
@@ -4,8 +4,8 @@
* Theme override for a select element.
*
* Available variables:
- * - attributes: HTML attributes for the select tag.
- * - options: The option element children.
+ * - attributes: HTML attributes for the <select> tag.
+ * - options: The <option> element children.
*
* @see template_preprocess_select()
*/
diff --git a/core/themes/classy/templates/form/textarea.html.twig b/core/themes/classy/templates/form/textarea.html.twig
index 24e647b..99e1bde 100644
--- a/core/themes/classy/templates/form/textarea.html.twig
+++ b/core/themes/classy/templates/form/textarea.html.twig
@@ -5,7 +5,7 @@
*
* Available variables
* - wrapper_attributes: A list of HTML attributes for the wrapper element.
- * - attributes: A list of HTML attributes for the textarea element.
+ * - attributes: A list of HTML attributes for the <textarea> element.
* - resizable: An indicator for whether the textarea is resizable.
* - required: An indicator for whether the textarea is required.
* - value: The textarea content.
diff --git a/core/themes/classy/templates/layout/region.html.twig b/core/themes/classy/templates/layout/region.html.twig
index cff654a..95e71ce 100644
--- a/core/themes/classy/templates/layout/region.html.twig
+++ b/core/themes/classy/templates/layout/region.html.twig
@@ -5,7 +5,7 @@
*
* Available variables:
* - content: The content for this region, typically blocks.
- * - attributes: HTML attributes for the region div.
+ * - attributes: HTML attributes for the region <div>.
* - region: The name of the region variable as defined in the theme's
* .info.yml file.
*
diff --git a/core/themes/seven/css/components/tables.css b/core/themes/seven/css/components/tables.css
index 3bdf7cc..913e21a 100644
--- a/core/themes/seven/css/components/tables.css
+++ b/core/themes/seven/css/components/tables.css
@@ -116,7 +116,7 @@ td.is-active {
background: none;
}
-/* Force browsers to calculate the width of a 'select all' TH element. */
+/* Force browsers to calculate the width of a 'select all' <th> element. */
th.select-all {
width: 1px;
}
diff --git a/core/themes/stable/templates/admin/field-ui-table.html.twig b/core/themes/stable/templates/admin/field-ui-table.html.twig
index 5a05852..72523f6 100644
--- a/core/themes/stable/templates/admin/field-ui-table.html.twig
+++ b/core/themes/stable/templates/admin/field-ui-table.html.twig
@@ -12,7 +12,7 @@
* https://www.drupal.org/node/893530 and
* http://api.drupal.org/api/drupal/includes!theme.inc/function/theme_table/7#comment-5109.
* - header: Table header cells. Each cell contains the following properties:
- * - tag: The HTML tag name to use; either TH or TD.
+ * - tag: The HTML tag name to use; either 'th' or 'td'.
* - attributes: HTML attributes to apply to the tag.
* - content: A localized string for the title of the column.
* - field: Field name (required for column sorting).
@@ -24,7 +24,7 @@
* - no_striping: A flag indicating that the row should receive no
* 'even / odd' styling. Defaults to FALSE.
* - cells: Table cells of the row. Each cell contains the following keys:
- * - tag: The HTML tag name to use; either TH or TD.
+ * - tag: The HTML tag name to use; either 'th' or 'td'.
* - attributes: Any HTML attributes, such as "colspan", to apply to the
* table cell.
* - content: The string to display in the table cell.
diff --git a/core/themes/stable/templates/dataset/table.html.twig b/core/themes/stable/templates/dataset/table.html.twig
index b7267be..231ada2 100644
--- a/core/themes/stable/templates/dataset/table.html.twig
+++ b/core/themes/stable/templates/dataset/table.html.twig
@@ -12,7 +12,7 @@
* https://www.drupal.org/node/893530 and
* http://api.drupal.org/api/drupal/includes!theme.inc/function/theme_table/7#comment-5109.
* - header: Table header cells. Each cell contains the following properties:
- * - tag: The HTML tag name to use; either TH or TD.
+ * - tag: The HTML tag name to use; either 'th' or 'td'.
* - attributes: HTML attributes to apply to the tag.
* - content: A localized string for the title of the column.
* - field: Field name (required for column sorting).
@@ -24,7 +24,7 @@
* - no_striping: A flag indicating that the row should receive no
* 'even / odd' styling. Defaults to FALSE.
* - cells: Table cells of the row. Each cell contains the following keys:
- * - tag: The HTML tag name to use; either TH or TD.
+ * - tag: The HTML tag name to use; either 'th' or 'td'.
* - attributes: Any HTML attributes, such as "colspan", to apply to the
* table cell.
* - content: The string to display in the table cell.