Browse Source

HTML5 compliancy: use data prefix for custom attributes

spaghetti 8 years ago
parent
commit
06c1b69558
4 changed files with 9 additions and 5 deletions
  1. 1
    1
      classes/text.class.php
  2. 1
    1
      classes/users.class.php
  3. 2
    2
      static/functions/comments.js
  4. 5
    1
      static/styles/global.css

+ 1
- 1
classes/text.class.php View File

@@ -828,7 +828,7 @@ class Text {
828 828
             if (isset($Exploded[1]) && (is_numeric($Exploded[1]) || (in_array($Exploded[1][0], array('a', 't', 'c', 'r')) && is_numeric(substr($Exploded[1], 1))))) {
829 829
               // the part after | is either a number or starts with a, t, c or r, followed by a number (forum post, artist comment, torrent comment, collage comment or request comment, respectively)
830 830
               $PostID = trim($Exploded[1]);
831
-              $Str .= '<a quote-jump="'.$PostID.'"><strong class="quoteheader">'.$Exploded[0].'</strong> wrote: </a>';
831
+              $Str .= '<a data-quote-jump="'.$PostID.'"><strong class="quoteheader">'.$Exploded[0].'</strong> wrote: </a>';
832 832
             }
833 833
             else {
834 834
               $Str .= '<strong class="quoteheader">'.$Exploded[0].'</strong> wrote: ';

+ 1
- 1
classes/users.class.php View File

@@ -468,7 +468,7 @@ class Users {
468 468
 
469 469
   public static function make_class_abbrev_string($ClassID) {
470 470
     global $Classes;
471
-    return '<acronym title="'.$Classes[$ClassID]['Name'].'">'.$Classes[$ClassID]['Abbreviation'].'</acronym>';
471
+    return '<abbr title="'.$Classes[$ClassID]['Name'].'">'.$Classes[$ClassID]['Abbreviation'].'</abbr>';
472 472
   }
473 473
 
474 474
   /**

+ 2
- 2
static/functions/comments.js View File

@@ -422,9 +422,9 @@ $(document).ready(function() {
422 422
 
423 423
   })
424 424
 })
425
-document.querySelectorAll('[quote-jump]').forEach(function(el) {
425
+document.querySelectorAll('[data-quote-jump]').forEach(function(el) {
426 426
   el.addEventListener('click', function(event) {
427
-    QuoteJump(event, el.attributes['quote-jump'].value)
427
+    QuoteJump(event, el.attributes['data-quote-jump'].value)
428 428
   })
429 429
 })
430 430
 

+ 5
- 1
static/styles/global.css View File

@@ -111,7 +111,7 @@ div.collage_image {
111 111
   width: 20%;
112 112
 }
113 113
 
114
-[data-toggle-target], [quote-jump] {
114
+[data-toggle-target], [data-quote-jump] {
115 115
   cursor: pointer;
116 116
 }
117 117
 
@@ -143,6 +143,10 @@ button, input[type=button], input[type=submit] {
143 143
   border: none;
144 144
 }
145 145
 
146
+abbr[title] {
147
+  text-decoration: none;
148
+}
149
+
146 150
 .line_new {
147 151
   color: green;
148 152
 }

Loading…
Cancel
Save