A barrier-free component construction method, device, equipment and storage medium

By detecting the target locations with accessibility requirements in web pages, obtaining basic components that meet international standards, and configuring configuration information when the basic components package business components, and building accessibility components, the problem of poor accessibility characteristics of web pages in the existing technology is solved, and the decoupling of accessibility and business logic is achieved, reducing development costs.

CN112306469BActive Publication Date: 2025-02-28DOUYIN VISION CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN201910774120.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-08-21
Publication Date
2025-02-28
Estimated Expiration
2040-09-16

AI Technical Summary

Technical Problem

The existing Internet web pages did not consider the special circumstances of people with disabilities during design, resulting in poor accessibility characteristics. Especially for people with visually impaired people who need to use auxiliary tools when accessing web pages, but screen reading software is difficult to obtain information such as pictures and videos, which increases development costs and reduces development efficiency.

Method used

By detecting whether business components are set up in the target location with accessibility requirements on the web page, the basic components that meet international standards are obtained, and configuration information is determined based on the basic components and business components. When the basic components package the business components, these configuration information are configured into the business components to build the barrier-free components.

Benefits of technology

It realizes the decoupling of barrier-free access and business logic, simplifies the development difficulty of barrier-free access, reduces development costs, and does not require special encoding in various places on the web page where interaction is required.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112306469B_ABST
    Figure CN112306469B_ABST
Patent Text Reader

Abstract

The embodiments of the present disclosure disclose a method, device, equipment and storage medium for constructing barrier-free components. The method includes: in the current web page, detecting whether a business component is set at a target location with barrier-free access requirements; in response to a business component being set at the target location, obtaining a constructed basic component corresponding to the barrier-free access requirements; determining configuration information according to the basic component and the business component; when the basic component packages the business component, configuring the above configuration information in the business component to construct the barrier-free component. In the technical solution of the embodiments of the present disclosure, during the development process, since the basic component already complies with the international standards related to barrier-free access, there is no need to consider the international standards in the process of constructing barrier-free components based on the basic component; since the barrier-free component is constructed on the basis of the business component, barrier-free access and business logic can be decoupled, simplifying the difficulty of barrier-free access development.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of Internet application technology, and in particular to a barrier-free component construction method, device, equipment and storage medium. Background Art

[0002] The vigorous development of Internet technology has led to a new trend of social informatization. Today, the Internet has become an essential channel for people to exchange information in their daily lives. However, most existing Internet web pages were not designed with the special circumstances of people with disabilities in mind, and the accessibility of web pages is poor, which makes it difficult for people with disabilities to access web pages.

[0003] For example, when visually impaired people visit a web page, they need to use assistive tools to obtain information on the web page. For example, after obtaining the user's touch operation, the screen reader software will give real-time feedback. For example, the screen reader software will voice prompt the user about the text that is touched at this time. However, a lot of information on the web page, such as pictures, videos, etc., does not have corresponding web page elements that replace text, which makes it difficult for the screen reader software to obtain this information. The existing solution is to perform special coding in various places on the web page that require interaction, such as special coding in buttons, pictures, input boxes, etc., so that the screen reader software can obtain this information, but this is bound to increase development costs and reduce development efficiency. Summary of the invention

[0004] The embodiments of the present disclosure provide a method, apparatus, device and storage medium for constructing an accessible component to achieve the decoupling of accessible access and business logic and reduce development costs.

[0005] In a first aspect, an embodiment of the present disclosure provides a method for constructing an accessibility component, which may include:

[0006] In the current web page, detecting whether a business component is set at a target location with barrier-free access requirements;

[0007] In response to a business component being arranged at the target location, obtaining a constructed basic component corresponding to the barrier-free access requirement;

[0008] Determine configuration information based on basic components and business components;

[0009] When the basic component packages the business component, the above configuration information is configured in the business component to build an accessible component.

[0010] In a second aspect, the embodiments of the present disclosure further provide a barrier-free component construction device, which may include:

[0011] A business component detection module is used in the current web page to detect whether a business component is set at a target location with barrier-free access requirements;

[0012] A basic component acquisition module, for acquiring a constructed basic component corresponding to the barrier-free access requirement in response to a business component being arranged at a target location;

[0013] A configuration information determination module, used to determine configuration information based on basic components and business components;

[0014] The barrier-free component construction module is used to configure the above configuration information into the business component to construct the barrier-free component when the basic component packages the business component.

[0015] In a third aspect, the present disclosure also provides a terminal device, which may include:

[0016] one or more processors;

[0017] a memory for storing one or more programs,

[0018] When one or more programs are executed by one or more processors, the one or more processors implement the barrier-free component construction method provided by any embodiment of the present disclosure.

[0019] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the barrier-free component construction method provided by any embodiment of the present disclosure is implemented.

[0020] The technical solution of the embodiment of the present disclosure is that in the development system, in the current web page, it is detected whether a business component is set at the target location with barrier-free access requirements; if in response to the business component being set at the target location, the constructed basic component corresponding to the barrier-free access requirements is obtained, and the basic component is in compliance with international standards related to barrier-free access; based on the realization of barrier-free access requirements, the configuration information to be configured is determined according to the basic component and the business component; further, when the basic component packages the business component, the above configuration information can be configured in the business component to construct the barrier-free component, and the barrier-free component at this time can have barrier-free access and business functions at the same time. In the above technical solution, during the development process, firstly, since the basic component has met the international standards related to barrier-free access, there is no need to consider the international standards in the process of constructing the barrier-free component based on the basic component; secondly, since the barrier-free component is constructed on the basis of the business component, the decoupling of barrier-free access and business logic can be achieved, which simplifies the development difficulty of barrier-free access and reduces the development cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0022] Figure 1 is a flowchart of a barrier-free component construction method in Embodiment 1 of the present disclosure;

[0023] Figure 2 is a flowchart of a barrier-free component construction method in Embodiment 2 of the present disclosure;

[0024] Figure 3 It is a structural block diagram of a barrier-free component construction device in Embodiment 3 of the present disclosure;

[0025] Figure 4 It is a structural diagram of a terminal device in Embodiment 4 of the present disclosure. DETAILED DESCRIPTION

[0026] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0027] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0028] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0029] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0030] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0031] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0032] Before introducing the embodiments of the present invention, the application scenarios of the embodiments of the present invention are described first:

[0033] The current web page can display a lot of content, such as buttons, input boxes, texts, pictures, videos, titles, etc. Taking buttons as an example, different buttons may represent different meanings, such as forward, backward, start, exit, zoom in, zoom out, etc. Exemplarily, a business component may be set at the target position of the current web page, and the business component is used to prompt the user to operate the target position, or the corresponding function that can be achieved when operating the business component. For example, a button is set at the upper right corner of the current web page, and an identifier of "close" is set on the button, which prompts the user to operate the target position or the business component can close the current web page. Another exemplary example is that there may be no business component set at the target position of the current web page, because the display content related information at the target position can be directly obtained without the prompt of the business component, and / or, there is no display content related information that needs to be interacted at the target position, for example, a "Welcome to this website" animated picture is presented at the target position, and the role of the animated picture is only to display without interacting with the user.

[0034] However, no matter which case, people with disabilities, especially visually impaired people, cannot directly obtain the information related to the displayed content with their naked eyes. They need the help of assistive tools to obtain it. For example, taking screen reading software as an example, if the screen reading software can read the information related to the displayed content, it can voice prompt the disabled person with the information related to the displayed content based on the reading results, so that the disabled person can proceed to the next step. It should be noted that the information related to the displayed content that can be read by assistive tools must comply with international standards related to barrier-free access. When developers develop web pages with barrier-free access features, they first need to understand the above international standards, and then they can develop corresponding functions for use with assistive tools, which is difficult for developers.

[0035] In order to solve this problem, the disclosed embodiment provides a set of basic component libraries, which are built based on the above international standards, and some configuration information related to barrier-free access features can be configured in the basic component library, which can package business components to build barrier-free components, or can be used directly as barrier-free components. In this way, when developing web pages, developers can directly use this set of basic component libraries to develop web pages with barrier-free access features that meet international standards, without the need to perform special coding in various places on the web pages that require interaction, and without the need to understand international standards, which can significantly reduce development costs and improve development efficiency.

[0036] Embodiment 1

[0037] Figure 1 This is a flowchart of a barrier-free component construction method provided in the first embodiment of the present disclosure. This embodiment is applicable to the case where barrier-free components that meet international standards are constructed based on the constructed basic components, and is particularly applicable to the case where barrier-free components that decouple barrier-free access and business logic are constructed. The method can be executed by the barrier-free component construction device provided in the embodiment of the present disclosure, and the device can be implemented by software and / or hardware, and the device can be integrated in various user terminal devices or servers.

[0038] See also Figure 1 The method of the embodiment of the present disclosure specifically includes the following steps:

[0039] S110 . In the current web page, it is detected whether a business component is set at a target location with barrier-free access requirements.

[0040] Among them, in the development system, for the disabled, especially the visually impaired, most of the information related to the displayed content in the current web page cannot be directly obtained by the naked eye, that is, there is a barrier-free access requirement for these displayed content related information. If business components are set at these target locations with barrier-free access requirements, barrier-free components can be built on the basis of business components. Therefore, it is possible to first detect whether business components are set at the target locations with barrier-free access requirements, and then determine how to build barrier-free components based on the detection results.

[0041] S120: In response to a business component being set at the target location, obtaining a constructed basic component corresponding to the barrier-free access requirement.

[0042] If the target location where the business component is set in the current web page has an accessibility requirement, or the business component has an accessibility requirement, then in response to the business component being set at the target location, a built basic component corresponding to the accessibility requirement is obtained. Exemplarily, a button is set at the upper right corner of the current web page, and a "close" identifier is set on the button, which prompts the user to operate the target location to close the current web page. Obviously, the target location has an accessibility requirement, and a built basic component can be obtained.

[0043] It should be noted that the constructed basic components can be considered as the abstraction of the common logic in the barrier-free access process. It may not contain any component information, or it may contain some component information related to barrier-free access features. More importantly, the basic components are components that comply with international standards related to barrier-free access. When building barrier-free components based on the basic components, there is no need to consider international standards.

[0044] S130. Determine configuration information according to basic components and business components.

[0045] Among them, usually, the basic component itself may not work directly, but it can be used in combination with the business component in the current web page, that is, the business component is packaged based on the basic component to build an accessible component. It should be noted that when packaging the business component based on the basic component, it is necessary to configure component information related to accessible access, such as description information, role information, etc. Therefore, before executing the packaging step, the configuration information to be configured can be determined based on the basic component and the business component. The configuration information is the component information related to the business component for accessible access, because the accessibility requirements of different business components may be different.

[0046] S140. When the basic component packages the business component, the above configuration information is configured in the business component to build an accessible component.

[0047] Among them, the component information related to barrier-free access that is not included in the basic component can be passed in during the packaging process, that is, when the basic component packages the business component, the component information related to barrier-free access is configured, and this component information is the configuration information described above. Therefore, when the basic component packages the business component, the above configuration information can be configured in the business component to build a barrier-free component, or in other words, the above configuration information can be configured in the configuration file of the business component to build an barrier-free component. In this way, the barrier-free component carries relevant component information, that is, it can have both the component information of the business component and the component information for barrier-free access.

[0048] In this way, the barrier-free component obtained based on the above steps can have barrier-free access and business functions at the same time, and this business can be various user needs, such as closing the current web page, adjusting the brightness, etc. It should be noted that packaging is actually a way of building a component, that is, a way of building a barrier-free component. In this way, compared with the prior art, the barrier-free component in the embodiment of the present disclosure can also have barrier-free access and business functions at the same time, but in the development process, the business component can only focus on its own business logic, and the barrier-free access decoupled from the business logic can be placed in the basic component for processing, which can significantly reduce the development cost and has no impact on the implementation of the current web page.

[0049] For example, if a business component for closing the current web page is loaded in the current web page, the component information of the business component is: when a click operation is detected at the target location, close the current web page; and the barrier-free access related to the business component is: button and close the current web page. Then, in the development system, the business component can realize the function of closing the current web page, and the basic component may not contain any component information. At this time, barrier-free access and business logic have been separated. When the basic component packages the business component, the following configuration information is configured into the business component: role information (button) and description information (close the current web page), thereby constructing a barrier-free component.

[0050] To understand it from another perspective, in the front-end field, a web page can be considered as the result obtained after passing data into a function, that is, web page = f(data), where function f is the component. What the function needs to accomplish is to receive the data that the web page needs to display. The data can be described by the function as a state to be displayed, thus becoming a web page. Therefore, the so-called packaging can be understood as that after receiving some data, the function returns a result that is still a function (component), and the web page finally realized is nested layer by layer. In the embodiment of the present disclosure, the configuration information is the data, so in the packaging process, the configuration information is used as input, and the business component is used as a function, and the result obtained is a barrier-free component.

[0051] The technical solution of the embodiment of the present disclosure is that in the development system, in the current web page, it is detected whether a business component is set at the target location with barrier-free access requirements; if in response to the business component being set at the target location, the constructed basic component corresponding to the barrier-free access requirements is obtained, and the basic component is in compliance with international standards related to barrier-free access; based on the realization of barrier-free access requirements, the configuration information to be configured is determined according to the basic component and the business component; further, when the basic component packages the business component, the above configuration information can be configured in the business component to construct the barrier-free component, and the barrier-free component at this time can have barrier-free access and business functions at the same time. In the above technical solution, during the development process, firstly, since the basic component has met the international standards related to barrier-free access, there is no need to consider the international standards in the process of constructing the barrier-free component based on the basic component; secondly, since the barrier-free component is constructed on the basis of the business component, the decoupling of barrier-free access and business logic can be achieved, which simplifies the development difficulty of barrier-free access and reduces the development cost.

[0052] It should be noted that, first of all, the reason for decoupling accessibility and business logic is that the accessibility component is obtained in advance by packaging the business component based on the basic component, wherein the basic component can be used to achieve accessibility, and the business component can be used to achieve business functions. In this way, since there is no correlation between accessibility and business logic, accessibility is completed outside the business logic. Therefore, when building business components, accessibility can be separated from business logic, and each business logic can only focus on its own content, thereby achieving the decoupling and splitting of accessibility and business logic. As for the function of accessibility, a basic component can be constructed to handle it separately, and the accessibility component obtained by packaging the business component based on the basic component can achieve accessibility and business functions at the same time, and can also achieve the decoupling of accessibility and business logic, which will make the business logic of the business component simpler, thereby simplifying the difficulty of accessibility development.

[0053] In other words, the reason for decoupling accessibility from business logic is that business logic is a level for implementing the front-end interface. There are many things that need to be done in business logic, such as requesting a list from the server and displaying it, processing the process of users placing orders for goods, searching for web pages related to keywords, etc. Compared with these complete contents, accessibility can be considered as scattered contents. If the implementation of accessibility is also written into the business logic, the business logic will be more complicated. While paying attention to those complete contents, you also need to pay attention to these scattered contents, which will obviously increase the development cost.

[0054] Secondly, after the accessibility component is built, it can be loaded into the current web page through the following steps: when initializing the current web page, obtain the configuration file of the accessibility component to be loaded, and load the accessibility component according to the configuration file. Usually, the accessibility component is pre-obtained during the development stage or the compilation stage, that is, the business component is pre-obtained by packaging it based on the basic component. It is just that when initializing the current web page, the configuration file of the accessibility component to be loaded can be obtained, and the pre-built accessibility component can be loaded according to the configuration file.

[0055] Embodiment 2

[0056] Figure 2 It is a flowchart of a barrier-free component construction method provided in the second embodiment of the present disclosure. This embodiment is optimized based on the above-mentioned first embodiment. In this embodiment, the basic components can be pre-constructed through the following steps: if there is common component information, the basic components are constructed based on the common component information, wherein the common component information is used to achieve barrier-free access; correspondingly, the configuration information is determined according to the basic components and the business components, which may include: determining the difference component information between the preset component information and the common component information, and using the difference component information as the configuration information.

[0057] Correspondingly, such as Figure 2 As shown, the method of this embodiment may specifically include the following steps:

[0058] S210: In the current web page, it is detected whether a business component is set at a target location with barrier-free access requirements.

[0059] S220. In response to a business component being set at a target location, obtain a constructed basic component corresponding to the barrier-free access requirement, wherein the basic component is pre-constructed through the following steps: if common component information exists, construct the basic component based on the common component information, and the common component information is used to achieve barrier-free access.

[0060] Among them, components can be subdivided into actual components and abstract components. Actual components are components that can be seen directly, such as buttons, input boxes, pictures, titles, text boxes, etc.; correspondingly, abstract components can be components that cannot be seen directly and are built based on some component information. When abstract components and actual components cooperate with each other, actual components can also have component information of these abstract components. Similarly, taking component information for barrier-free access as an example, if the component information for barrier-free access related to multiple business components in the current web page is the same, these component information can be used as common component information, and basic components can be constructed based on the common component information. For example, if the common component information is the role information of a button, the role information in the basic component constructed thereby is solidified as a button. The more common component information, the more solidified information in the basic component constructed thereby. In this way, when the business component is packaged based on the basic component, the less configuration information is configured in the business component, and the development process of the barrier-free component is simpler. This is because the configuration information configured in the business component is not included in the basic component and is the component information necessary for achieving barrier-free access. The more common component information for achieving barrier-free access solidified in the basic component, the less configuration information to be configured.

[0061] S230: Determine the difference component information between the preset component information and the common component information, and use the difference component information as configuration information.

[0062] The preset component information may be the necessary component information for achieving barrier-free access, such as role information and description information; correspondingly, the common component information may include role information and / or description information. The role information may be used to describe the role of the barrier-free component, such as a button, input box, picture, title, text box, etc.; the description information may be used to describe the substantial content of the barrier-free component, such as closing the current web page, adjusting the brightness, etc.

[0063] For example, if there are three business components A, B and C in the current web page, these three business components are buttons and have barrier-free access requirements, and when these three buttons are clicked, "close the current web page", "forward" and "backward" can be realized respectively. Then, in the development process, the common component information can be a button (role information), and a basic component D is constructed based on the common component information. Based on D, A, B and C are packaged respectively, thereby constructing barrier-free components A1, B1 and C1. Taking the packaging of A based on D as an example, the configuration information that needs to be configured in A is descriptive information, such as closing the current web page.

[0064] S240. When the basic component packages the business component, the above configuration information is configured in the business component to build an accessible component.

[0065] The technical solution of the embodiment of the present disclosure, if there is common component information, builds a basic component based on the common component information, and can determine the difference component information between the preset component information and the common component information, and use the difference component information as the configuration information to be configured. The advantage of such a setting is that the basic component built based on the common component information can be considered as an abstraction of the common component information, so that the basic component can be reused, that is, when packaging many business components, the same basic component can be used, and there is no need to write similar embedded code in different places in the business logic. Moreover, when the common component information changes, the change of all basic components associated with the common component information can be achieved by changing the common component information in one place, without changing the embedded code in multiple places in the business logic, thereby significantly reducing the possibility of errors and improving the efficiency of changes.

[0066] It should be noted that the basic components can be pre-built through common component information, or pre-built through component types of business components, or pre-built through common component information and component types of business components. This is because common component information and component types of business components are completely different levels of content, and basic components can be built from multiple angles. In the case of pre-building basic components through component types of business components, specifically, the component type of the business component can be obtained, and the basic component can be built according to the component type, where the component type can include React components and / or Vue components. This is because the packaging form of business components may be different in different front-end technology systems, and business components of different component types correspond to different packaging forms. For example, if the component type is a Vue component, the packaging of the Vue component can be implemented by designing a directive; if the component type is a React component, the packaging of the React component can be implemented by a high-order component (HOC); and so on.

[0067] In fact, to put it simply, components can be nested in each other. For example, high-level components can wrap low-level components. Then, packaging business components can be understood as building a basic component that is higher than the business component, so that the business component can be wrapped based on the basic component. For example, if the component type is a React component, the basic component can be a high-order component (HOC). Therefore, if you need to support React components, you can build a set of basic components that match React components; if you need to support Vue components, you can build a set of basic components that match Vue components. In fact, you can build a basic component library that matches React components and Vue components in advance. In this way, in the development stage, the corresponding basic component library can be directly provided to developers, thereby simplifying development costs.

[0068] An optional solution, in response to the fact that no business component is set at the target location, that is, no business component is set at the target location where there is an accessibility requirement, an accessibility component corresponding to the accessibility requirement can be directly constructed. This accessibility component can be from a basic component library with accessibility characteristics. At this time, it is only necessary to select a suitable basic component from the basic component library and configure the appropriate configuration information in the basic component to successfully construct it. For example, there is an accessibility requirement for obtaining image information at the target location of the current web page, and the accessibility component corresponding to this accessibility requirement can include "image" (role information) and "Welcome to this website" (description information). Then, a basic component whose role information has been solidified as a picture can be selected from the basic component library, and then, in the process of web page development, "Welcome to this website" can be configured in this basic component. Alternatively, if the role information and description information of a basic component in the basic component library have been solidified into a state to be constructed, this basic component can be directly used as an accessibility component.

[0069] Embodiment 3

[0070] Figure 3 This is a structural block diagram of an accessible component construction device provided in Embodiment 3 of the present disclosure. The device is used to execute the accessible component construction method provided in any of the above embodiments. The device and the accessible component construction method of the above embodiments belong to the same inventive concept. For details not described in detail in the embodiments of the accessible component construction device, please refer to the embodiments of the accessible component construction method. Figure 3 The device may include: a business component detection module 310, a basic component acquisition module 320, a configuration information determination module 330 and an accessibility component construction module 340.

[0071] The business component detection module 310 is used to detect whether a business component is set at a target location with barrier-free access requirements in the current web page;

[0072] A basic component acquisition module 320, for acquiring a constructed basic component corresponding to an accessibility requirement in response to a business component being arranged at a target location;

[0073] A configuration information determination module 330, configured to determine configuration information according to basic components and business components;

[0074] The barrier-free component construction module 340 is used to configure the above configuration information into the business component to construct the barrier-free component when the basic component packages the business component.

[0075] Optionally, on this basis, basic components can be pre-built with the following modules:

[0076] A first basic component construction module is used to construct a basic component based on the common component information if there is any common component information, wherein the common component information is used to achieve barrier-free access;

[0077] Accordingly, the barrier-free component construction module 340 can be specifically used for:

[0078] The difference component information between the preset component information and the common component information is determined, and the difference component information is used as the configuration information to be configured.

[0079] Optionally, the preset component information may include role information and description information; the common component information may include role information and / or description information.

[0080] Optionally, on this basis, basic components can be pre-built with the following modules:

[0081] The second basic component construction module is used to obtain the component type of the business component and construct the basic component according to the component type.

[0082] Optionally, the component type may include a React component and / or a Vue component.

[0083] Optionally, on this basis, the device may further include:

[0084] The barrier-free component obtaining module is used to construct a barrier-free component corresponding to barrier-free access requirements when no business component is set for the target location.

[0085] Optionally, the accessibility component can be loaded into the current web page via the following modules:

[0086] When initializing the current web page, obtain the configuration file of the accessibility component to be loaded, and load the accessibility component according to the configuration file.

[0087] The barrier-free component construction device provided in the third embodiment of the present disclosure, in the development system, in the current web page, the business component detection module detects whether the business component is set in the target position with barrier-free access requirements; the basic component acquisition module can obtain the constructed basic components corresponding to the barrier-free access requirements, and the basic components are in accordance with the international standards related to barrier-free access; based on the barrier-free access requirements, the configuration information determination module can determine the configuration information to be configured according to the basic components and the business components; further, when the basic components package the business components, the barrier-free component construction module can configure the above configuration information into the business components to construct the barrier-free components, and the barrier-free components at this time can have barrier-free access and business functions at the same time. In the above device, during the development process, firstly, since the basic components have met the international standards related to barrier-free access, there is no need to consider the international standards in the process of constructing barrier-free components based on the basic components; secondly, since the barrier-free components are constructed on the basis of the business components, barrier-free access and business logic can be decoupled, which simplifies the difficulty of barrier-free access development and reduces the development cost.

[0088] The barrier-free component construction device provided in the embodiments of the present disclosure can execute the barrier-free component construction method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0089] It is worth noting that in the embodiment of the above-mentioned barrier-free component construction device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present disclosure.

[0090] Embodiment 4

[0091] Reference below Figure 4 , which shows an electronic device (eg, Figure 4 The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0092] like Figure 4As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0093] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0094] Embodiment 5

[0095] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0096] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0097] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0098] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0099] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: detects whether a business component is set at a target location with barrier-free access requirements in the current web page; in response to the business component being set at the target location, obtains a constructed basic component corresponding to the barrier-free access requirements; determines configuration information based on the basic component and the business component; and when the basic component packages the business component, configures the above-mentioned configuration information in the business component to build an barrier-free component.

[0100] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0101] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0102] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of the unit does not limit the unit itself in some cases. For example, the basic component acquisition module may also be described as "in response to the business component being set at the target location, obtaining the constructed basic component corresponding to the barrier-free access requirement".

[0103] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0104] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0105] According to one or more embodiments of the present disclosure, [Example 1] provides a method for constructing an accessible component, which may include:

[0106] In the current web page, detecting whether a business component is set at a target location with barrier-free access requirements;

[0107] In response to a business component being arranged at the target location, obtaining a constructed basic component corresponding to the barrier-free access requirement;

[0108] Determine configuration information based on basic components and business components;

[0109] When the basic component packages the business component, the above configuration information is configured in the business component to build an accessible component.

[0110] According to one or more embodiments of the present disclosure, [Example 2] provides a method of Example 1, and the basic components can be pre-built through the following steps:

[0111] If there is common component information, construct the basic component based on the common component information, wherein the common component information is used to achieve barrier-free access;

[0112] Accordingly, the configuration information is determined based on the basic components and business components, which may include:

[0113] Determine the difference component information between the preset component information and the common component information, and use the difference component information as configuration information.

[0114] According to one or more embodiments of the present disclosure, [Example 3] provides the method of Example 2, wherein the preset component information includes role information and description information; the common component information includes role information and / or description information.

[0115] According to one or more embodiments of the present disclosure, [Example 4] provides a method of Example 1, and the basic components can be pre-built through the following steps:

[0116] Get the component type of the business component and build the basic component according to the component type.

[0117] According to one or more embodiments of the present disclosure, [Example 5] provides the method of Example 4, and the component type may include React components and / or Vue components.

[0118] According to one or more embodiments of the present disclosure, [Example 6] provides an example method, which may also include: in response to no business component being set at the target location, building an accessible component corresponding to the accessible access requirement.

[0119] According to one or more embodiments of the present disclosure, [Example 7] provides a method described in any one of Examples to Example 6, and the accessibility component can be loaded into the current web page through the following steps:

[0120] When initializing the current web page, obtain the configuration file of the accessibility component to be loaded, and load the accessibility component according to the configuration file.

[0121] According to one or more embodiments of the present disclosure, [Example 8] provides a barrier-free component construction device, which may include:

[0122] A business component detection module is used in the current web page to detect whether a business component is set at a target location with barrier-free access requirements;

[0123] A basic component acquisition module, for acquiring a constructed basic component corresponding to the barrier-free access requirement in response to a business component being arranged at a target location;

[0124] A configuration information determination module, used to determine configuration information based on basic components and business components;

[0125] The barrier-free component construction module is used to configure the above configuration information into the business component to construct the barrier-free component when the basic component packages the business component.

[0126] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0127] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0128] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A barrier-free component construction method, characterized in that: include: In the current webpage, detecting whether a business component for realizing a business function is set at a target location with barrier-free access requirements, so as to construct a barrier-free component based on the business component, and realize the decoupling of barrier-free access and the business logic corresponding to the business function; In response to the business component being arranged at the target location, obtaining a constructed basic component corresponding to the barrier-free access requirement, wherein the basic component is used to implement the barrier-free access and includes component information related to barrier-free access characteristics; Determining configuration information according to the basic component and the business component, wherein the configuration information is component information related to the business component and not included in the basic component for achieving barrier-free access; When the basic component packages the business component, the configuration information is configured in the business component to construct an accessible component, wherein the packaging is a way of constructing the accessible component, and the accessible component has both accessible access and business functions.

2. The method according to claim 1, characterized in that: The basic components are pre-built through the following steps: If there is common component information, construct the basic component based on the common component information, wherein the common component information is used to achieve barrier-free access; And the determining of configuration information according to the basic component and the business component includes: Determine the difference component information between the preset component information and the common component information, and use the difference component information as configuration information.

3. The method according to claim 2, characterized in that The preset component information includes role information and description information; the common component information includes the role information and / or the description information.

4. The method according to claim 1, characterized in that: The basic components are pre-built through the following steps: The component type of the business component is obtained, and the basic component is constructed according to the component type.

5. The method according to claim 4, characterized in that The component types include React components and / or Vue components.

6. The method according to claim 1, characterized in that Also includes: In response to the business component not being set at the target location, an accessible component corresponding to the accessible access requirement is constructed.

7. The method according to any one of claims 1 to 6, characterized in that: The accessibility component is loaded into the current web page through the following steps: When initializing the current web page, a configuration file of the barrier-free component to be loaded is obtained, and the barrier-free component is loaded according to the configuration file.

8. A barrier-free component construction device, characterized in that: include: A business component detection module is used in the current web page to detect whether a business component for realizing a business function is set at a target location with barrier-free access requirements, so as to build a barrier-free component based on the business component, and realize the decoupling of barrier-free access and the business logic corresponding to the business function; a basic component acquisition module, configured to acquire, in response to the business component being arranged at the target location, a constructed basic component corresponding to the barrier-free access requirement, wherein the basic component is used to implement the barrier-free access and contains component information related to barrier-free access characteristics; A configuration information determination module, configured to determine configuration information according to the basic component and the business component, wherein the configuration information is component information not included in the basic component and related to the business component for achieving barrier-free access; An accessibility component construction module is used to configure the configuration information in the business component to construct an accessibility component when the basic component packages the business component, wherein the packaging is the way the accessibility component is constructed, and the accessibility component has both accessible access and business functions.

9. A terminal device, characterized in that: The terminal device comprises: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the barrier-free component construction method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the barrier-free component construction method as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Page construction method and device, computer equipment and storage medium

    CN108762729A

  • Page generation method and device, electronic device, and computer-readable medium

    CN108958736A

  • Message input method and device, electronic equipment and readable medium

    CN109491646A