Changeset 161092 in webkit


Ignore:
Timestamp:
Dec 26, 2013 11:20:22 AM (10 years ago)
Author:
ap@apple.com
Message:

Some links at build.webkit.org/dashboard don't show status messages, and aren't keyboard accessible
https://bugs.webkit.org/show_bug.cgi?id=126234

Reviewed by Timothy Hatcher.

Changed elements that are semantically links from <div> to <a>.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/StatusLineView.js:

(StatusLineView): Create <a> or <div> elements conditionally on whether we have a URL.
Don't try simulate a link with CSS/JS, it's not needed any more.
(StatusLineView.prototype._clicked): Removed.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/BuildbotQueueView.css:

Removed text-decoration rules, default ones in Main.css now work for queue elements.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:

Simplified cursor rules.
Added a universal rule for links to only show underline on hover, as this is what
we want almost everywhere.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/StatusLineView.css:

(.status-line .bubble): Added text-decoration: none, as this is the one place where
we don't want it even on hover.
(.status-line .label): Force display: block for consistent layout between <a>
and <div>.

Location:
trunk/Tools
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/StatusLineView.js

    r161090 r161092  
    3434    this.element.__statusLineView = this;
    3535
    36     this._statusBubbleElement = document.createElement("div");
     36    if (url) {
     37        this._statusBubbleElement = document.createElement("a");
     38        this._statusBubbleElement.href = url;
     39        this._statusBubbleElement.target = "_blank";
     40    } else
     41        this._statusBubbleElement = document.createElement("div");
    3742    this._statusBubbleElement.classList.add("bubble");
    3843    if (status != StatusLineView.Status.NoBubble)
    3944        this.element.appendChild(this._statusBubbleElement);
    4045
    41     this._labelElement = document.createElement("div");
     46    if (url) {
     47        this._labelElement = document.createElement("a");
     48        this._labelElement.href = url;
     49        this._labelElement.target = "_blank";
     50    } else
     51        this._labelElement = document.createElement("div");
    4252    this._labelElement.classList.add("label");
    4353
     
    5161    this.repeatCount = repeatCount || 0;
    5262    this.url = url || null;
    53 
    54     if (url) {
    55         this.element.addEventListener("click", this._clicked.bind(this));
    56         this.element.classList.add("linked");
    57     }
    5863};
    5964
     
    156161            this._messageElement.textContent = x;
    157162        }
    158     },
    159 
    160     _clicked: function(event)
    161     {
    162         if (!this.url)
    163             return;
    164 
    165         var anchor = document.createElement("a");
    166         anchor.href = this.url;
    167         anchor.target = "_blank";
    168 
    169         anchor.click();
    170163    }
    171164};
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/BuildbotQueueView.css

    r159600 r161092  
    3535    color: rgb(145, 135, 95);
    3636    text-align: left;
    37     text-decoration: none;
    38 }
    39 
    40 .queue-view .queueLabel:hover {
    41     text-decoration: underline;
    4237}
    4338
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css

    r161078 r161092  
    2626* {
    2727    box-sizing: border-box;
    28     cursor: default;
    2928    -webkit-user-select: none;
    3029    -webkit-user-drag: none;
    3130}
    3231
    33 a:link {
    34     cursor: pointer;
     32a {
     33    text-decoration: none;
     34}
     35
     36a:hover {
     37    text-decoration: underline;
    3538}
    3639
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/StatusLineView.css

    r161090 r161092  
    3030}
    3131
    32 .status-line.linked,
    33 .status-line.linked * {
    34     cursor: pointer;
    35 }
    36 
    3732.status-line .bubble {
    3833    float: left;
     
    4944    margin-top: 2px;
    5045    margin-right: 6px;
     46    text-decoration: none;
    5147}
    5248
     
    9389    line-height: 11px;
    9490    padding-top: 1px;
     91    display: block;
    9592}
    9693
     
    103100.status-line .message * {
    104101    color: inherit;
    105 }
    106 
    107 .status-line .message a:link {
    108     text-decoration: none;
    109 }
    110 
    111 .status-line .message a:link:hover {
    112     text-decoration: underline;
    113102}
    114103
     
    142131    color: rgb(191, 67, 41);
    143132}
    144 
    145 .status-line.linked .label:hover {
    146     text-decoration: underline;
    147 }
  • trunk/Tools/ChangeLog

    r161090 r161092  
     12013-12-26  Alexey Proskuryakov  <ap@apple.com>
     2
     3        Some links at build.webkit.org/dashboard don't show status messages, and aren't keyboard accessible
     4        https://bugs.webkit.org/show_bug.cgi?id=126234
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        Changed elements that are semantically links from <div> to <a>.
     9
     10        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/StatusLineView.js:
     11        (StatusLineView): Create <a> or <div> elements conditionally on whether we have a URL.
     12        Don't try simulate a link with CSS/JS, it's not needed any more.
     13        (StatusLineView.prototype._clicked): Removed.
     14
     15        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/BuildbotQueueView.css:
     16        Removed text-decoration rules, default ones in Main.css now work for queue elements.
     17
     18        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:
     19        Simplified cursor rules.
     20        Added a universal rule for links to only show underline on hover, as this is what
     21        we want almost everywhere.
     22
     23        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/StatusLineView.css:
     24        (.status-line .bubble): Added text-decoration: none, as this is the one place where
     25        we don't want it even on hover.
     26        (.status-line .label): Force display: block for consistent layout between <a>
     27        and <div>.
     28
    1292013-12-25  Alexey Proskuryakov  <ap@apple.com>
    230
Note: See TracChangeset for help on using the changeset viewer.