Commit 8e2cf9db authored by xjm's avatar xjm

Issue #2546248 by scythian, XaviP, darrenwh, mikebell_, ingaro, urbanlegend,...

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
parent 1eb935f9
...@@ -596,7 +596,7 @@ function template_preprocess_datetime_wrapper(&$variables) { ...@@ -596,7 +596,7 @@ function template_preprocess_datetime_wrapper(&$variables) {
* *
* Unfortunately links templates duplicate the "active" class handling of l() * Unfortunately links templates duplicate the "active" class handling of l()
* and LinkGenerator::generate() because it needs to be able to set the "active" * 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 * 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 * 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 * one to style list items only if it contains a certain element with a certain
...@@ -656,7 +656,7 @@ function template_preprocess_links(&$variables) { ...@@ -656,7 +656,7 @@ function template_preprocess_links(&$variables) {
if (!empty($links)) { if (!empty($links)) {
// Prepend the heading to the list, if any. // Prepend the heading to the list, if any.
if (!empty($heading)) { 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)) { if (is_string($heading)) {
$heading = array('text' => $heading); $heading = array('text' => $heading);
} }
...@@ -858,28 +858,28 @@ function template_preprocess_image(&$variables) { ...@@ -858,28 +858,28 @@ function template_preprocess_image(&$variables) {
* - colgroups: An array of column groups. Each element of the array can be * - colgroups: An array of column groups. Each element of the array can be
* either: * either:
* - An array of columns, each of which is an associative array of HTML * - An array of columns, each of which is an associative array of HTML
* attributes applied to the COL element. * attributes applied to the <col> element.
* - An array of attributes applied to the COLGROUP element, which must * - An array of attributes applied to the <colgroup> element, which must
* include a "data" attribute. To add attributes to COL elements, set the * include a "data" attribute. To add attributes to <col> elements,
* "data" attribute with an array of columns, each of which is an * set the "data" attribute with an array of columns, each of which is an
* associative array of HTML attributes. * associative array of HTML attributes.
* Here's an example for $colgroup: * Here's an example for $colgroup:
* @code * @code
* $colgroup = array( * $colgroup = array(
* // COLGROUP with one COL element. * // <colgroup> with one <col> element.
* array( * array(
* 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( * array(
* 'data' => array( * 'data' => array(
* 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 * @endcode
...@@ -1157,7 +1157,7 @@ function template_preprocess_container(&$variables) { ...@@ -1157,7 +1157,7 @@ function template_preprocess_container(&$variables) {
* An associative array containing: * An associative array containing:
* - items: An associative array of maintenance tasks. * - items: An associative array of maintenance tasks.
* It's the caller's responsibility to ensure this array's items contain no * 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. * - active: The key for the currently active maintenance task.
*/ */
function template_preprocess_maintenance_task_list(&$variables) { function template_preprocess_maintenance_task_list(&$variables) {
...@@ -1267,7 +1267,7 @@ function template_preprocess_html(&$variables) { ...@@ -1267,7 +1267,7 @@ function template_preprocess_html(&$variables) {
$variables['html_attributes'] = new Attribute(); $variables['html_attributes'] = new Attribute();
// HTML element attributes. // <html> element attributes.
$language_interface = \Drupal::languageManager()->getCurrentLanguage(); $language_interface = \Drupal::languageManager()->getCurrentLanguage();
$variables['html_attributes']['lang'] = $language_interface->getId(); $variables['html_attributes']['lang'] = $language_interface->getId();
$variables['html_attributes']['dir'] = $language_interface->getDirection(); $variables['html_attributes']['dir'] = $language_interface->getDirection();
......
...@@ -1035,11 +1035,11 @@ ...@@ -1035,11 +1035,11 @@
// been sufficiently tested whether attachBehaviors() can be successfully // been sufficiently tested whether attachBehaviors() can be successfully
// called with a context object that includes top-level text nodes. // called with a context object that includes top-level text nodes.
// However, to give developers full control of the HTML appearing in the // 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 // 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), // elements are not allowed (e.g., within <table>, <tr>, and <span>
// we check if the new content satisfies the requirement of a single // parents), we check if the new content satisfies the requirement
// top-level element, and only use the container DIV created above when // of a single top-level element, and only use the container <div> created
// it doesn't. For more information, please see // above when it doesn't. For more information, please see
// https://www.drupal.org/node/736066. // https://www.drupal.org/node/736066.
if ($new_content.length !== 1 || $new_content.get(0).nodeType !== 1) { if ($new_content.length !== 1 || $new_content.get(0).nodeType !== 1) {
$new_content = $new_content_wrapped; $new_content = $new_content_wrapped;
......
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
// range. Also make sure that we are actually checking checkboxes // range. Also make sure that we are actually checking checkboxes
// over a range and that a checkbox has been checked or unchecked before. // over a range and that a checkbox has been checked or unchecked before.
if (e.shiftKey && lastChecked && lastChecked !== e.target) { 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); Drupal.tableSelectRange($(e.target).closest('tr')[0], $(lastChecked).closest('tr')[0], e.target.checked);
} }
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
* - no_striping: A flag indicating that the row should receive no * - no_striping: A flag indicating that the row should receive no
* 'even / odd' styling. Defaults to FALSE. * 'even / odd' styling. Defaults to FALSE.
* - cells: Table cells of the row. Each cell contains the following keys: * - 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 * - attributes: Any HTML attributes, such as "colspan", to apply to the
* table cell. * table cell.
* - content: The string to display in the table cell. * - content: The string to display in the table cell.
......
...@@ -4,18 +4,19 @@ ...@@ -4,18 +4,19 @@
* Default theme implementation for a fieldset element and its children. * Default theme implementation for a fieldset element and its children.
* *
* Available variables: * Available variables:
* - attributes: HTML attributes for the fieldset element. * - attributes: HTML attributes for the <fieldset> element.
* - errors: (optional) Any errors for this fieldset element, may not be set. * - errors: (optional) Any errors for this <fieldset> element, may not be set.
* - required: Boolean indicating whether the fieldeset element is required. * - required: Boolean indicating whether the <fieldeset> element is required.
* - legend: The legend element containing the following properties: * - legend: The <legend> element containing the following properties:
* - title: Title of the fieldset, intended for use as the text of the legend. * - title: Title of the <fieldset>, intended for use as the text
* - attributes: HTML attributes to apply to the legend. of the <legend>.
* - attributes: HTML attributes to apply to the <legend> element.
* - description: The description element containing the following properties: * - 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. * - attributes: HTML attributes to apply to the description container.
* - children: The rendered child elements of the fieldset. * - children: The rendered child elements of the <fieldset>.
* - prefix: The content to add before the fieldset children. * - prefix: The content to add before the <fieldset> children.
* - suffix: The content to add after the fieldset children. * - suffix: The content to add after the <fieldset> children.
* *
* @see template_preprocess_fieldset() * @see template_preprocess_fieldset()
* *
...@@ -38,7 +39,7 @@ ...@@ -38,7 +39,7 @@
required ? 'form-required', 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 }}> <legend{{ legend.attributes }}>
<span{{ legend_span.attributes.addClass(legend_span_classes) }}>{{ legend.title }}</span> <span{{ legend_span.attributes.addClass(legend_span_classes) }}>{{ legend.title }}</span>
</legend> </legend>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* *
* Available variables: * Available variables:
* - content: The content for this region, typically blocks. * - 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 * - region: The name of the region variable as defined in the theme's
* .info.yml file. * .info.yml file.
* *
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* Default theme implementation for a select element. * Default theme implementation for a select element.
* *
* Available variables: * Available variables:
* - attributes: HTML attributes for the select tag. * - attributes: HTML attributes for the <select> tag.
* - options: The option element children. * - options: The <option> element children.
* *
* @see template_preprocess_select() * @see template_preprocess_select()
* *
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* https://www.drupal.org/node/893530 and * https://www.drupal.org/node/893530 and
* http://api.drupal.org/api/drupal/includes!theme.inc/function/theme_table/7#comment-5109. * 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: * - 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. * - attributes: HTML attributes to apply to the tag.
* - content: A localized string for the title of the column. * - content: A localized string for the title of the column.
* - field: Field name (required for column sorting). * - field: Field name (required for column sorting).
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
* - no_striping: A flag indicating that the row should receive no * - no_striping: A flag indicating that the row should receive no
* 'even / odd' styling. Defaults to FALSE. * 'even / odd' styling. Defaults to FALSE.
* - cells: Table cells of the row. Each cell contains the following keys: * - 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 * - attributes: Any HTML attributes, such as "colspan", to apply to the
* table cell. * table cell.
* - content: The string to display in the table cell. * - content: The string to display in the table cell.
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* *
* Available variables * Available variables
* - wrapper_attributes: A list of HTML attributes for the wrapper element. * - 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. * - resizable: An indicator for whether the textarea is resizable.
* - required: An indicator for whether the textarea is required. * - required: An indicator for whether the textarea is required.
* - value: The textarea content. * - value: The textarea content.
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* https://www.drupal.org/node/893530 and * https://www.drupal.org/node/893530 and
* http://api.drupal.org/api/drupal/includes!theme.inc/function/theme_table/7#comment-5109. * 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: * - 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. * - attributes: HTML attributes to apply to the tag.
* - content: A localized string for the title of the column. * - content: A localized string for the title of the column.
* - field: Field name (required for column sorting). * - field: Field name (required for column sorting).
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
* - no_striping: A flag indicating that the row should receive no * - no_striping: A flag indicating that the row should receive no
* 'even / odd' styling. Defaults to FALSE. * 'even / odd' styling. Defaults to FALSE.
* - cells: Table cells of the row. Each cell contains the following keys: * - 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 * - attributes: Any HTML attributes, such as "colspan", to apply to the
* table cell. * table cell.
* - content: The string to display in the table cell. * - content: The string to display in the table cell.
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
required ? 'form-required', 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 }}> <legend{{ legend.attributes }}>
<span{{ legend_span.attributes.addClass(legend_span_classes) }}>{{ legend.title }}</span> <span{{ legend_span.attributes.addClass(legend_span_classes) }}>{{ legend.title }}</span>
</legend> </legend>
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* Theme override for a select element. * Theme override for a select element.
* *
* Available variables: * Available variables:
* - attributes: HTML attributes for the select tag. * - attributes: HTML attributes for the <select> tag.
* - options: The option element children. * - options: The <option> element children.
* *
* @see template_preprocess_select() * @see template_preprocess_select()
*/ */
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* *
* Available variables * Available variables
* - wrapper_attributes: A list of HTML attributes for the wrapper element. * - 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. * - resizable: An indicator for whether the textarea is resizable.
* - required: An indicator for whether the textarea is required. * - required: An indicator for whether the textarea is required.
* - value: The textarea content. * - value: The textarea content.
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* *
* Available variables: * Available variables:
* - content: The content for this region, typically blocks. * - 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 * - region: The name of the region variable as defined in the theme's
* .info.yml file. * .info.yml file.
* *
......
...@@ -116,7 +116,7 @@ td.is-active { ...@@ -116,7 +116,7 @@ td.is-active {
background: none; 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 { th.select-all {
width: 1px; width: 1px;
} }
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* https://www.drupal.org/node/893530 and * https://www.drupal.org/node/893530 and
* http://api.drupal.org/api/drupal/includes!theme.inc/function/theme_table/7#comment-5109. * 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: * - 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. * - attributes: HTML attributes to apply to the tag.
* - content: A localized string for the title of the column. * - content: A localized string for the title of the column.
* - field: Field name (required for column sorting). * - field: Field name (required for column sorting).
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
* - no_striping: A flag indicating that the row should receive no * - no_striping: A flag indicating that the row should receive no
* 'even / odd' styling. Defaults to FALSE. * 'even / odd' styling. Defaults to FALSE.
* - cells: Table cells of the row. Each cell contains the following keys: * - 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 * - attributes: Any HTML attributes, such as "colspan", to apply to the
* table cell. * table cell.
* - content: The string to display in the table cell. * - content: The string to display in the table cell.
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* https://www.drupal.org/node/893530 and * https://www.drupal.org/node/893530 and
* http://api.drupal.org/api/drupal/includes!theme.inc/function/theme_table/7#comment-5109. * 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: * - 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. * - attributes: HTML attributes to apply to the tag.
* - content: A localized string for the title of the column. * - content: A localized string for the title of the column.
* - field: Field name (required for column sorting). * - field: Field name (required for column sorting).
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
* - no_striping: A flag indicating that the row should receive no * - no_striping: A flag indicating that the row should receive no
* 'even / odd' styling. Defaults to FALSE. * 'even / odd' styling. Defaults to FALSE.
* - cells: Table cells of the row. Each cell contains the following keys: * - 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 * - attributes: Any HTML attributes, such as "colspan", to apply to the
* table cell. * table cell.
* - content: The string to display in the table cell. * - content: The string to display in the table cell.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment