File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -209,15 +209,13 @@ export abstract class DropzoneBase extends SpectrumElement {
209209 // ──────────────────────────────
210210
211211 /**
212- * Called when the `dragged` state changes. Subclasses override this to
212+ * Called when the `dragged` state changes. Subclasses implement this to
213213 * update the shadow DOM status region for accessibility announcements.
214214 *
215- * @param _isDragged - `true` when drag enters; `false` when it leaves.
215+ * @param isDragged - `true` when drag enters; `false` when it leaves.
216216 * @internal
217217 */
218- protected _onDragStateChange ( _isDragged : boolean ) : void {
219- // Implemented in the concrete SWC class.
220- }
218+ protected abstract _onDragStateChange ( isDragged : boolean ) : void ;
221219
222220 /** @internal */
223221 private _clearDragLeaveTimer ( ) : void {
Original file line number Diff line number Diff line change @@ -39,3 +39,12 @@ export const SWC_DROPZONE_DRAGLEAVE_EVENT = 'swc-dropzone-dragleave';
3939
4040/** Fired when files are dropped on the drop zone. */
4141export const SWC_DROPZONE_DROP_EVENT = 'swc-dropzone-drop' ;
42+
43+ declare global {
44+ interface GlobalEventHandlersEventMap {
45+ [ SWC_DROPZONE_SHOULD_ACCEPT_EVENT ] : CustomEvent < DragEvent > ;
46+ [ SWC_DROPZONE_DRAGOVER_EVENT ] : CustomEvent < DragEvent > ;
47+ [ SWC_DROPZONE_DRAGLEAVE_EVENT ] : CustomEvent < DragEvent > ;
48+ [ SWC_DROPZONE_DROP_EVENT ] : CustomEvent < DragEvent > ;
49+ }
50+ }
Original file line number Diff line number Diff line change @@ -60,9 +60,7 @@ export class Dropzone extends DropzoneBase {
6060
6161 public override connectedCallback ( ) : void {
6262 super . connectedCallback ( ) ;
63- if ( ! this . hasAttribute ( 'role' ) ) {
64- this . setAttribute ( 'role' , 'group' ) ;
65- }
63+ this . setAttribute ( 'role' , 'group' ) ;
6664 if ( window . __swc ?. DEBUG ) {
6765 this . _warnMissingAccessibleName ( ) ;
6866 }
You can’t perform that action at this time.
0 commit comments