bito-code-review[bot] commented on code in PR #37167:
URL: https://github.com/apache/superset/pull/37167#discussion_r2695155687
##########
superset/templates/superset/basic.html:
##########
@@ -0,0 +1,133 @@
+{# Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with this work
+for additional information regarding copyright ownership. The ASF licenses this
+file to you under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by
+applicable law or agreed to in writing, software distributed under the License
+is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the specific language
+governing permissions and limitations under the License. #}
+
+<!DOCTYPE html>
+{% import 'appbuilder/general/lib.html' as lib %} {% from
+'superset/partials/asset_bundle.html' import css_bundle, js_bundle with context
+%} {% set favicons = appbuilder.app.config['FAVICONS'] %}
+<html lang="en">
+ <head>
+ <title>
+ {% block title %} {% if title %} {{ title }} {% elif appbuilder and
+ appbuilder.app_name %} {{ appbuilder.app_name }} {% endif %} {% endblock
+ %}
+ </title>
+ {% block head_meta %}{% endblock %} {% block head_css %} {% for favicon in
+ favicons %} <link rel="{{favicon.rel if favicon.rel else "icon"}}"
+ type="{{favicon.type if favicon.type else "image/png"}}" {% if
favicon.sizes
+ %}sizes={{favicon.sizes}}{% endif %} href="{{ "" if
+ favicon.href.startswith("http") else assets_prefix }}{{favicon.href}}" > {%
+ endfor %}
+ <link
+ rel="stylesheet"
+ type="text/css"
+ href="{{ assets_prefix }}/static/appbuilder/css/flags/flags16.css"
+ />
+ <link
+ rel="stylesheet"
+ type="text/css"
+ href="{{ assets_prefix
}}/static/appbuilder/css/fontawesome/fontawesome.min.css"
+ />
+ <link
+ rel="stylesheet"
+ type="text/css"
+ href="{{ assets_prefix
}}/static/appbuilder/css/fontawesome/regular.min.css"
+ />
+ <link
+ rel="stylesheet"
+ type="text/css"
+ href="{{ assets_prefix
}}/static/appbuilder/css/fontawesome/solid.min.css"
+ />
+ <link
+ rel="stylesheet"
+ type="text/css"
+ href="{{ assets_prefix
}}/static/appbuilder/css/fontawesome/brands.min.css"
+ />
+ <link
+ rel="stylesheet"
+ type="text/css"
+ href="{{ assets_prefix
}}/static/appbuilder/css/bootstrap-datepicker/bootstrap-datepicker3.min.css"
+ />
+ <link
+ rel="stylesheet"
+ type="text/css"
+ href="{{ assets_prefix }}/static/appbuilder/css/select2/select2.min.css"
+ />
+ <link
+ rel="stylesheet"
+ type="text/css"
+ href="{{ assets_prefix
}}/static/appbuilder/css/select2/select2-bootstrap.min.css"
+ />
+
+ {{ css_bundle("theme") }} {% if entry %} {{ css_bundle(entry) }} {% endif
%}
+ {% endblock %} {{ js_bundle("theme") }}
+
+ <input
+ type="hidden"
+ name="csrf_token"
+ id="csrf_token"
+ value="{{ csrf_token() if csrf_token else '' }}"
+ />
+ </head>
+
+ <body {% if standalone_mode %}class="standalone" {% endif %}>
+ {% block navbar %} {% if not standalone_mode %} {% include
+ 'appbuilder/navbar.html' %} {% endif %} {% endblock %} {% block body %}
+ <div id="app" data-bootstrap="{{ bootstrap_data }}">
+ <img
+ src="{{ assets_prefix }}/static/assets/images/loading.gif"
+ style="
+ width: 50px;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ "
+ />
+ </div>
+ {% endblock %}
+
+ <!-- Modal for misc messages / alerts -->
+ <div
+ class="misc-modal modal fade"
+ tabindex="-1"
+ role="dialog"
+ aria-labelledby="myModalLabel"
+ >
+ <div class="modal-dialog" role="document">
+ <div class="modal-content" data-test="modal-content">
+ <div class="modal-header" data-test="modal-header">
+ <button
+ type="button"
+ class="close"
+ data-dismiss="modal"
+ aria-label="Close"
+ data-test="modal-header-close-button"
+ >
+ <span aria-hidden="true">×</span>
+ </button>
+ <h4 data-test="modal-title" class="modal-title"></h4>
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Accessibility: Missing Modal ID</b></div>
<div id="fix">
The modal's aria-labelledby points to 'myModalLabel', but the h4 lacks this
id, breaking screen reader accessibility. Add the id to ensure proper labeling.
</div>
<details>
<summary>
<b>Code suggestion</b>
</summary>
<blockquote>Check the AI-generated fix before applying</blockquote>
<div id="code">
````suggestion
<h4 id="myModalLabel" data-test="modal-title"
class="modal-title"></h4>
````
</div>
</details>
</div>
<small><i>Code Review Run #e3ec58</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
##########
superset/templates/superset/basic.html:
##########
@@ -0,0 +1,133 @@
+{# Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with this work
+for additional information regarding copyright ownership. The ASF licenses this
+file to you under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by
+applicable law or agreed to in writing, software distributed under the License
+is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the specific language
+governing permissions and limitations under the License. #}
+
+<!DOCTYPE html>
+{% import 'appbuilder/general/lib.html' as lib %} {% from
+'superset/partials/asset_bundle.html' import css_bundle, js_bundle with context
+%} {% set favicons = appbuilder.app.config['FAVICONS'] %}
+<html lang="en">
+ <head>
+ <title>
+ {% block title %} {% if title %} {{ title }} {% elif appbuilder and
+ appbuilder.app_name %} {{ appbuilder.app_name }} {% endif %} {% endblock
+ %}
+ </title>
+ {% block head_meta %}{% endblock %} {% block head_css %} {% for favicon in
+ favicons %} <link rel="{{favicon.rel if favicon.rel else "icon"}}"
+ type="{{favicon.type if favicon.type else "image/png"}}" {% if
favicon.sizes
+ %}sizes={{favicon.sizes}}{% endif %} href="{{ "" if
+ favicon.href.startswith("http") else assets_prefix }}{{favicon.href}}" > {%
+ endfor %}
+ <link
+ rel="stylesheet"
+ type="text/css"
+ href="{{ assets_prefix }}/static/appbuilder/css/flags/flags16.css"
+ />
+ <link
+ rel="stylesheet"
+ type="text/css"
+ href="{{ assets_prefix
}}/static/appbuilder/css/fontawesome/fontawesome.min.css"
+ />
+ <link
+ rel="stylesheet"
+ type="text/css"
+ href="{{ assets_prefix
}}/static/appbuilder/css/fontawesome/regular.min.css"
+ />
+ <link
+ rel="stylesheet"
+ type="text/css"
+ href="{{ assets_prefix
}}/static/appbuilder/css/fontawesome/solid.min.css"
+ />
+ <link
+ rel="stylesheet"
+ type="text/css"
+ href="{{ assets_prefix
}}/static/appbuilder/css/fontawesome/brands.min.css"
+ />
+ <link
+ rel="stylesheet"
+ type="text/css"
+ href="{{ assets_prefix
}}/static/appbuilder/css/bootstrap-datepicker/bootstrap-datepicker3.min.css"
+ />
+ <link
+ rel="stylesheet"
+ type="text/css"
+ href="{{ assets_prefix }}/static/appbuilder/css/select2/select2.min.css"
+ />
+ <link
+ rel="stylesheet"
+ type="text/css"
+ href="{{ assets_prefix
}}/static/appbuilder/css/select2/select2-bootstrap.min.css"
+ />
+
+ {{ css_bundle("theme") }} {% if entry %} {{ css_bundle(entry) }} {% endif
%}
+ {% endblock %} {{ js_bundle("theme") }}
+
+ <input
+ type="hidden"
+ name="csrf_token"
+ id="csrf_token"
+ value="{{ csrf_token() if csrf_token else '' }}"
+ />
+ </head>
+
+ <body {% if standalone_mode %}class="standalone" {% endif %}>
+ {% block navbar %} {% if not standalone_mode %} {% include
+ 'appbuilder/navbar.html' %} {% endif %} {% endblock %} {% block body %}
+ <div id="app" data-bootstrap="{{ bootstrap_data }}">
+ <img
+ src="{{ assets_prefix }}/static/assets/images/loading.gif"
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Accessibility: Missing Alt Text</b></div>
<div id="fix">
The loading image lacks an alt attribute, which is required for screen
readers. Add alt text to describe the image.
</div>
<details>
<summary>
<b>Code suggestion</b>
</summary>
<blockquote>Check the AI-generated fix before applying</blockquote>
<div id="code">
````suggestion
src="{{ assets_prefix }}/static/assets/images/loading.gif"
alt="Loading"
````
</div>
</details>
</div>
<small><i>Code Review Run #e3ec58</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]